Fs
Modules for interacting with the file system.
Effect Hierarchy
[D] = has @DefaultHandler.
FileSystem [D] (29 ops — unified root)
├── FileStat [D] (11 ops)
│ ├── FileTest [D] (4 ops)
│ │ ├── FileExists — exists
│ │ ├── IsDirectory — isDirectory
│ │ ├── IsRegularFile — isRegularFile
│ │ └── IsSymbolicLink — isSymbolicLink
│ ├── FilePermission [D] (3 ops)
│ │ ├── IsReadable — isReadable
│ │ ├── IsWritable — isWritable
│ │ └── IsExecutable — isExecutable
│ ├── FileTime [D] (3 ops)
│ │ ├── AccessTime — accessTime
│ │ ├── CreationTime — creationTime
│ │ └── ModificationTime — modificationTime
│ └── FileSize — size
├── FileRead [D] (3 ops)
│ ├── ReadFile — read
│ ├── ReadLines — readLines
│ └── ReadBytes — readBytes
├── DirList [D] — list
├── Glob [D] — glob
└── FileWrite [D] (13 ops)
├── WriteFile — write
├── WriteLines — writeLines
├── WriteBytes — writeBytes
├── AppendFile — append
├── AppendLines — appendLines
├── AppendBytes — appendBytes
├── Truncate — truncate
├── CopyFile — copyWith
├── MoveFile — moveWith
├── DeleteFile — delete
├── MkDir — mkDir
├── MkDirs — mkDirs
└── MkTempDir — mkTempDir
Middleware Availability
| FileTest | FilePermission | FileTime | FileStat | FileRead | DirList | Glob | FileWrite | FileSystem | |
|---|---|---|---|---|---|---|---|---|---|
| withLogging | x | x | x | x | x | x | x | x | x |
| withBaseDir | x | x | x | x | x | x | x | x | x |
| withChroot | x | x | x | x | x | x | x | x | x |
| withAllowList | x | x | x | x | x | x | x | x | x |
| withDenyList | x | x | x | x | x | x | x | x | x |
| withAllowGlob | x | x | x | x | x | x | x | x | x |
| withDenyGlob | x | x | x | x | x | x | x | x | x |
| withFollowLinks | x | x | x | x | x | x | x | x | x |
| withTransferLimit | x | x | x | ||||||
| withChecksum | x | x | x | ||||||
| withDryRun | x | x | |||||||
| withReadOnly | x | x | |||||||
| withAtomicWrite | x | x | |||||||
| withBackup | x | x | |||||||
| withConflictCheck | x | x | |||||||
| withMkParentDirs | x | x | |||||||
| withSizeRotation | x | x | |||||||
| withMemoryOverlay | x | ||||||||
| withInMemoryFS | x |
Modules
| FsLayer | Low-level file system operations shared by the `Fs` effect handlers. |
| InMemoryFs | Type of fully in-memory file systems, and its functions. |
| MemoryOverlay | Type of in-memory overlays that record changes on top of a lower file system layer, and its functions. |
Effects
| AccessTime | Effect for reading the last access time of a file. |
| AppendBytes | Effect for appending bytes to a file. |
| AppendFile | Effect for appending a string to a file. |
| AppendLines | Effect for appending lines to a file. |
| CopyFile | Effect for copying a file. |
| CreationTime | Effect for reading the creation time of a file. |
| DeleteFile | Effect for deleting a file. |
| DirList | Effect for listing the contents of a directory. |
| FileExists | Effect for checking whether a file exists. |
| FilePermission | Effect for checking whether a file is readable, writable, or executable. |
| FileRead | Effect for reading the contents of a file as a string, as lines, or as bytes. |
| FileSize | Effect for reading the size of a file. |
| FileStat | Effect for reading file metadata, such as file type, permissions, timestamps, and size. |
| FileSystem | Effect for performing all filesystem operations. |
| FileTest | Effect for testing whether a path exists, is a directory, is a regular file, or is a symbolic link. |
| FileTime | Effect for reading the access, creation, and modification times of a file. |
| FileWrite | Effect for modifying files and directories. |
| Glob | Effect for finding files matching a glob pattern. |
| IsDirectory | Effect for checking whether a path is a directory. |
| IsExecutable | Effect for checking whether a file is executable. |
| IsReadable | Effect for checking whether a file is readable. |
| IsRegularFile | Effect for checking whether a path is a regular file. |
| IsSymbolicLink | Effect for checking whether a path is a symbolic link. |
| IsWritable | Effect for checking whether a file is writable. |
| MkDir | Effect for creating a directory. |
| MkDirs | Effect for creating a directory and all its parent directories. |
| MkTempDir | Effect for creating a temporary directory. |
| ModificationTime | Effect for reading the last modification time of a file. |
| MoveFile | Effect for moving or renaming a file or directory. |
| ReadBytes | Effect for reading the bytes of a file. |
| ReadFile | Effect for reading the contents of a file as a string. |
| ReadLines | Effect for reading the lines of a file. |
| Truncate | Effect for truncating a file. |
| WriteBytes | Effect for writing bytes to a file. |
| WriteFile | Effect for writing a string to a file. |
| WriteLines | Effect for writing lines to a file. |
Enums
| CopyOption | Type of options for the `copyWith` operation. |
| MoveOption | Type of options for the `moveWith` operation. |
| Size | Type of file sizes. |
| SizeUnit | Type of file size units. |