Procs
proc hardlink_to(self: Path; target: string | Path)
- Added in version 3.10. Source Edit
proc read_bytes(self: Path): PyBytes {....raises: [IOError], tags: [ReadIOEffect], forbids: [].}
- Source Edit
proc stat(self: Path): stat_result {....raises: [FileExistsError, FileNotFoundError, IsADirectoryError, OSError], tags: [], forbids: [].}
- Source Edit
proc symlink_to(self: Path; target: string | Path; target_is_directory = false)
- Source Edit
proc write_bytes(self: Path; b: PyBytes) {....raises: [IOError], tags: [WriteIOEffect], forbids: [].}
- Source Edit
proc write_text(self: Path; data: PyStr; encoding = DefEncoding; errors = DefErrors): int {.discardable, ...raises: [ValueError, LookupError, FileExistsError, FileNotFoundError, IsADirectoryError, OSError, Exception], tags: [RootEffect], forbids: [].}
- Source Edit
Templates
template open(self: Path; mode: StringLike = "r"; buffering = -1; encoding = DefEncoding; errors = DefErrors; newline = DefNewLine): untyped
- Source Edit
Exports
-
/, parents, as_posix, /, Path, cwd, is_relative_to, is_absolute, ==, iterdir, samefile, parent, hash, relative_to, absolute, open, /, $, is_file, parents, mkdirParentsExistsOk, iterdir, home, is_symlink, with_name, Path, with_suffix, joinpath, is_relative_to, is_dir