src/pylib/Lib/pathlib

Source   Edit  

Procs

func `/`(p: PathLike; self: Path): Path
Source   Edit  
func `/`(self: Path; p: PathLike): Path
Source   Edit  
func `/=`(head: var Path; tail: PathLike): Path
Source   Edit  
func fspath(self: Path): PyStr {....raises: [], tags: [], forbids: [].}
Source   Edit  
func joinpath[P: PathLike](self: Path; pathsegments: varargs[P]): Path
Source   Edit  
proc mkdir(self: Path; mode = 0o000000000777; parents = false; exist_ok = false) {.
    ...raises: [OSError, IOError, PyOSError, PyOSError],
    tags: [WriteDirEffect, ReadDirEffect], forbids: [].}
Source   Edit  
func name(self: Path): PyStr {....raises: [], tags: [], forbids: [].}
Source   Edit  
func parts(self: Path): PyList[PyStr] {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc Path[P: PathLike](pathsegments: varargs[P]): types.Path
Source   Edit  
proc read_bytes(self: Path): PyBytes {....raises: [IOError], tags: [ReadIOEffect],
                                       forbids: [].}
Source   Edit  
proc read_text(self: Path; encoding = DefEncoding; errors = DefErrors): PyStr {.
    ...raises: [ValueError, LookupError, PyOSError, Exception, IOError],
    tags: [RootEffect, ReadIOEffect], forbids: [].}
Source   Edit  
proc rename(self: Path; target: Path): Path {.discardable, ...raises: [PyOSError],
    tags: [], forbids: [].}
Source   Edit  
proc rename(self: Path; target: string): Path {.discardable,
    ...raises: [PyOSError], tags: [], forbids: [].}
Source   Edit  
proc replace(self: Path; target: Path): Path {.discardable, ...raises: [PyOSError],
    tags: [], forbids: [].}
Source   Edit  
proc replace(self: Path; target: string): Path {.discardable,
    ...raises: [PyOSError], tags: [], forbids: [].}
Source   Edit  
proc rmdir(self: Path) {....raises: [PyOSError], tags: [], forbids: [].}
Source   Edit  
func stem(self: Path): PyStr {....raises: [], tags: [], forbids: [].}
Source   Edit  
func suffix(self: Path): PyStr {....raises: [], tags: [], forbids: [].}
Source   Edit  
func suffixes(self: Path): PyList[PyStr] {....raises: [], tags: [], forbids: [].}
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, PyOSError, 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