lsm-tree-1.1.1.0: Log-structured merge-trees
Safe HaskellSafe-Inferred
LanguageGHC2021

Database.LSMTree.Internal.FS

Synopsis

Hard links

hardLink :: (MonadMask m, PrimMonad m) => HasFS m h -> HasBlockIO m h -> ActionRegistry m -> FsPath -> FsPath -> m () Source #

hardLink hfs hbio reg sourcePath destinationPath creates a hard link from sourcePath to destinationPath.

Both the source path and destination path should be on the same disk volume.

hardLinkDirectoryRecursive Source #

Arguments

:: (MonadMask m, PrimMonad m) 
=> HasFS m h 
-> HasBlockIO m h 
-> ActionRegistry m 
-> FsPath

Source path

-> FsPath

Destination path

-> m () 

Recursively create hard links for all the directory contents of the source path at the destination path.

Both the source path and destination path should be on the same disk volume.

Copy file

copyFile :: (MonadMask m, PrimMonad m) => HasFS m h -> ActionRegistry m -> FsPath -> FsPath -> m () Source #

copyFile hfs reg sourcePath destinationPath copies the file contents of sourcePath to the destinationPath.

Hard links with fallback

data Mode m h Source #

The file transfer mode to be used by a snapshot import or export.

Constructors

HardLink 

Fields

forall h'. Copy 

Fields

  • !(HasFS m h')

    The HasFS instance that enables copying.

hardLinkOrCopyDirectoryRecursive Source #

Arguments

:: (MonadMask m, PrimMonad m) 
=> HasFS m h

The HasFS instance for the source filesystem

-> Mode m h

Either a HasBlockIO instance for the source filesystem, or a HasFS instance for the destination filesystem

-> ActionRegistry m 
-> FsPath

Source path

-> FsPath

Destination path

-> m ()