Types
PathComponent = enum pcFile, ## path refers to a file pcLinkToFile, ## path refers to a symbolic link to a file pcDir, ## path refers to a directory pcLinkToDir ## path refers to a symbolic link to a directory
-
Enumeration specifying a path component.
See also:
Source Edit ReadDirEffect = object of ReadIOEffect
- Effect that denotes a read operation from the directory structure. Source Edit
WriteDirEffect = object of WriteIOEffect
- Effect that denotes a write operation to the directory structure. Source Edit
Procs
proc getSymlinkFileKind(path: string): tuple[pc: PathComponent, isSpecial: bool] {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc tryMoveFSObject(source, dest: string; isDir: bool): bool {. ...raises: [OSError], tags: [], forbids: [].}
-
Moves a file (or directory if isDir is true) from source to dest.
Returns false in case of EXDEV error or AccessDeniedError on Windows (if isDir is true). In case of other errors OSError is raised. Returns true in case of success.
Source Edit