flix

0.78.0

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

FsLayerLow-level file system operations shared by the `Fs` effect handlers.
InMemoryFsType of fully in-memory file systems, and its functions.
MemoryOverlayType of in-memory overlays that record changes on top of a lower file system layer, and its functions.

Effects

AccessTimeEffect for reading the last access time of a file.
AppendBytesEffect for appending bytes to a file.
AppendFileEffect for appending a string to a file.
AppendLinesEffect for appending lines to a file.
CopyFileEffect for copying a file.
CreationTimeEffect for reading the creation time of a file.
DeleteFileEffect for deleting a file.
DirListEffect for listing the contents of a directory.
FileExistsEffect for checking whether a file exists.
FilePermissionEffect for checking whether a file is readable, writable, or executable.
FileReadEffect for reading the contents of a file as a string, as lines, or as bytes.
FileSizeEffect for reading the size of a file.
FileStatEffect for reading file metadata, such as file type, permissions, timestamps, and size.
FileSystemEffect for performing all filesystem operations.
FileTestEffect for testing whether a path exists, is a directory, is a regular file, or is a symbolic link.
FileTimeEffect for reading the access, creation, and modification times of a file.
FileWriteEffect for modifying files and directories.
GlobEffect for finding files matching a glob pattern.
IsDirectoryEffect for checking whether a path is a directory.
IsExecutableEffect for checking whether a file is executable.
IsReadableEffect for checking whether a file is readable.
IsRegularFileEffect for checking whether a path is a regular file.
IsSymbolicLinkEffect for checking whether a path is a symbolic link.
IsWritableEffect for checking whether a file is writable.
MkDirEffect for creating a directory.
MkDirsEffect for creating a directory and all its parent directories.
MkTempDirEffect for creating a temporary directory.
ModificationTimeEffect for reading the last modification time of a file.
MoveFileEffect for moving or renaming a file or directory.
ReadBytesEffect for reading the bytes of a file.
ReadFileEffect for reading the contents of a file as a string.
ReadLinesEffect for reading the lines of a file.
TruncateEffect for truncating a file.
WriteBytesEffect for writing bytes to a file.
WriteFileEffect for writing a string to a file.
WriteLinesEffect for writing lines to a file.

Enums

CopyOptionType of options for the `copyWith` operation.
MoveOptionType of options for the `moveWith` operation.
SizeType of file sizes.
SizeUnitType of file size units.