erg/crates/erg_compiler/lib/pystd/shutil.d.er
2025-01-29 10:44:31 +09:00

87 lines
2.2 KiB
Python

logging = pyimport "logging"
._WINDOWS: Bool
.chown!: (
path: PathLike,
user := Str,
group := Str,
dir_fd := Nat or FileDescriptor,
follow_symlinks := Bool,
) => NoneType
.copyfile!: (
src: PathLike,
dst: PathLike,
follow_symlinks := Bool,
) => NoneType
.copyfileobj!: (
fsrc: File! or FileDescriptor,
fdst: File! or FileDescriptor,
length := Int,
) => NoneType
.copymode!: (
src: PathLike,
dst: PathLike,
follow_symlinks := Bool,
) => NoneType
.copystat!: (
src: PathLike,
dst: PathLike,
follow_symlinks := Bool,
) => NoneType
.copy!: (src: PathLike, dst: PathLike,) => NoneType
.copy2!: (src: PathLike, dst: PathLike,) => NoneType
.copytree!: (
src: PathLike,
dst: PathLike,
symlinks := Bool,
ignore := GenericCallable,
copy_function := GenericCallable,
ignore_dangling_symlinks := Bool,
dirs_exist_ok := Bool,
) => NoneType
.disk_usage!: (path: PathLike,) => NamedTuple {
.total = Nat;
.used = Nat;
.free = Nat;
}
.get_archive_formats!: () => [(Str, Str); _]
.get_unpack_formats!: () => [(Str, [Str; _], Str); _]
.get_terminal_size!: (fallback := (Nat, Nat)) => NamedTuple {
.columns = Nat;
.lines = Nat;
}
.ignore_patterns!: (*patterns: Str) => GenericCallable
.register_archive_format!: (name: Str, function: GenericCallable) => NoneType
.register_unpack_format!: (name: Str, extensions: [Str; _], function: GenericCallable) => NoneType
.rmtree!: (
path: PathLike,
ignore_errors := Bool,
onerror := Obj,
onexc := Obj,
dir_fd := Nat or FileDescriptor,
) => NoneType
.make_archive!: (
base_name: Str,
format: Str,
root_dir := Str,
base_dir := Str,
verbose := Bool,
dry_run := Bool,
owner := Str,
group := Str,
logger := logging.Logger!,
) => Str
.move!: (src: PathLike, dst: PathLike, copy_function := GenericCallable) => Str
.unpack_archive!: (
filename: PathLike,
extract_dir := PathLike,
format := Str,
filter := GenericCallable,
) => NoneType
.unregister_archive_format!: (name: Str) => NoneType
.unregister_unpack_format!: (name: Str) => NoneType
.which!: (
cmd: Str,
mode := Str,
path := Str or NoneType,
) => Str or NoneType