create#

用于创建新文件或目录的磁盘实用程序函数。

#

TemporaryDirectory

创建并返回一个临时目录。这具有相同的

ProgressFileWrapper

函数#

write_as_json_to_file(file_path, obj)

create_python_entry_point(target_full_path, ...)

create_application_entry_point(source_full_path, ...)

extract_tarball(tarball_full_path[, ...])

make_menu(prefix, file_path[, remove])

创建跨平台菜单项(例如 Windows 开始菜单)

create_hard_link_or_copy(src, dst)

_is_unix_executable_using_ORIGIN(path)

_do_softlink(src, dst)

create_fake_executable_softlink(src, dst)

copy(src, dst)

_do_copy(src, dst)

create_link(src, dst[, link_type, force])

compile_multiple_pyc(python_exe_full_path, ...)

create_package_cache_directory(pkgs_dir)

create_envs_directory(envs_dir)

属性#

class TemporaryDirectory(suffix='', prefix='tmp', dir=None)#

创建并返回一个临时目录。这具有与 mkdtemp 相同的行为,但可以用作上下文管理器。例如:

with TemporaryDirectory() as tmpdir

...

退出上下文时,目录及其包含的所有内容都将被删除。

name#
_closed = False#
__repr__()#

Return repr(self).

__enter__()#
cleanup(_warn=False, _warnings=_warnings)#
__exit__(exc, value, tb)#
__del__()#
stdoutlog
mkdir_p
python_entry_point_template
application_entry_point_template
write_as_json_to_file(file_path, obj)#
create_python_entry_point(target_full_path, python_full_path, module, func)#
create_application_entry_point(source_full_path, target_full_path, python_full_path)#
class ProgressFileWrapper(fileobj, progress_update_callback)#
__getattr__(name)#
__setattr__(name, value)#

Implement setattr(self, name, value).

read(size=-1)#
progress_update()#
extract_tarball(tarball_full_path, destination_directory=None, progress_update_callback=None)#
make_menu(prefix, file_path, remove=False)#

创建跨平台菜单项(例如 Windows 开始菜单)

将所有菜单配置文件 %PREFIX%/Menu/*.json 传递给 menuinst.installremove=True 将删除菜单项。

_is_unix_executable_using_ORIGIN(path)#
copy(src, dst)#
_do_copy(src, dst)#
compile_multiple_pyc(python_exe_full_path, py_full_paths, pyc_full_paths, prefix, py_ver)#
create_package_cache_directory(pkgs_dir)#
create_envs_directory(envs_dir)#