| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Database.LSMTree.Internal.FS
Description
Common file system operations
Synopsis
- hardLink :: (HasCallStack, MonadMask m, PrimMonad m) => ActionRegistry m -> HasFS m h -> HasBlockIO m h' -> FsPath -> FsPath -> m ()
- hardLinkDirectoryRec :: (HasCallStack, MonadMask m, PrimMonad m) => ActionRegistry m -> HasFS m h -> HasBlockIO m h' -> FsPath -> FsPath -> m ()
- copyFile' :: (HasCallStack, MonadMask m, PrimMonad m) => ActionRegistry m -> HasFS m h -> FsPath -> FsPath -> m ()
- copyFile :: (HasCallStack, MonadMask m, PrimMonad m) => ActionRegistry m -> HasFS m h -> FsPath -> HasFS m h' -> FsPath -> m ()
- copyDirectoryRec :: (HasCallStack, MonadMask m, PrimMonad m) => ActionRegistry m -> HasFS m h -> FsPath -> HasFS m h' -> FsPath -> m ()
- copyDirectoryRec' :: (HasCallStack, MonadMask m, PrimMonad m) => ActionRegistry m -> HasFS m h -> FsPath -> FsPath -> m ()
- hardLinkOrCopyDirectoryRec :: (HasCallStack, MonadMask m, PrimMonad m) => ActionRegistry m -> HasFS m h -> HasBlockIO m h' -> FsPath -> FsPath -> m ()
Hard links
Arguments
| :: (HasCallStack, MonadMask m, PrimMonad m) | |
| => ActionRegistry m | |
| -> HasFS m h | The file system |
| -> HasBlockIO m h' | The file system |
| -> FsPath | The path to the source file |
| -> FsPath | The path to the destination file |
| -> m () |
Create a hard link for a source file at a destination file /on the same file system/.
If the source path and destination path are not on the same disk volume, an
FsError with an EXDEV error number will be thrown.
Arguments
| :: (HasCallStack, MonadMask m, PrimMonad m) | |
| => ActionRegistry m | |
| -> HasFS m h | The file system |
| -> HasBlockIO m h' | The file system |
| -> FsPath | The path to the source directory |
| -> FsPath | The path to the destination directory |
| -> m () |
Recursively create hard links for a source directory and its contents at a destination directory on the same file system.
If the source path and destination path (or recursively their directory
contents) are not on the same disk volume, an FsError with an EXDEV error
number will be thrown.
Copy files and directories
Arguments
| :: (HasCallStack, MonadMask m, PrimMonad m) | |
| => ActionRegistry m | |
| -> HasFS m h | The file system |
| -> FsPath | The path to the source file |
| -> FsPath | The path to the destination file |
| -> m () |
Copy a source file to a destination file on the same file system.
Arguments
| :: (HasCallStack, MonadMask m, PrimMonad m) | |
| => ActionRegistry m | |
| -> HasFS m h | The source file system |
| -> FsPath | The path to the source file with respect to the source fileystem |
| -> HasFS m h' | The destination file system |
| -> FsPath | The path to the destination file with respect to the destination fileystem |
| -> m () |
Copy a source file to a destination file /on potentially different file systems/.
Arguments
| :: (HasCallStack, MonadMask m, PrimMonad m) | |
| => ActionRegistry m | |
| -> HasFS m h | |
| -> FsPath | The path to the source directory with respect to the source fileystem |
| -> HasFS m h' | The destination file system |
| -> FsPath | The path to the destination directory with respect to the destination fileystem |
| -> m () |
Recursively copy a source directory and its contents to a destination directory on potentially different file systems
Arguments
| :: (HasCallStack, MonadMask m, PrimMonad m) | |
| => ActionRegistry m | |
| -> HasFS m h | |
| -> FsPath | The path to the source directory |
| -> FsPath | The path to the destination directory |
| -> m () |
Recursively copy a source directory and its contents to a destination directory on the same file system.
Hard links with copy fallback
hardLinkOrCopyDirectoryRec Source #
Arguments
| :: (HasCallStack, MonadMask m, PrimMonad m) | |
| => ActionRegistry m | |
| -> HasFS m h | The file system |
| -> HasBlockIO m h' | The file system |
| -> FsPath | The path to the source directory |
| -> FsPath | The path to the destination directory |
| -> m () |
Attempt to use hardLinkDirectoryRec, and if that fails because the source
and destination directory are not on the same disk volume, use
copyDirectoryRec' instead.