FileSystemModule

PackageAxial.FileSystem

Summary

NameSignatureSynopsis
serviceFileSystem.service Reads the file-system service from the environment.
readAllTextFileSystem.readAllText pathReads all text through an explicit file-system service.
readAllTextWithEncodingFileSystem.readAllTextWithEncoding encoding pathReads all text with the specified encoding through an explicit file-system service.
readAllTextAsyncFileSystem.readAllTextAsync pathAsynchronously reads all text through an explicit file-system service.
readAllLinesFileSystem.readAllLines pathReads all lines through an explicit file-system service.
readAllLinesWithEncodingFileSystem.readAllLinesWithEncoding encoding pathReads all lines with the specified encoding through an explicit file-system service.
readAllLinesAsyncFileSystem.readAllLinesAsync pathAsynchronously reads all lines through an explicit file-system service.
readAllBytesFileSystem.readAllBytes pathReads all bytes through an explicit file-system service.
readAllBytesAsyncFileSystem.readAllBytesAsync pathAsynchronously reads all bytes through an explicit file-system service.
writeAllTextFileSystem.writeAllText path contentsWrites all text through an explicit file-system service.
writeAllTextWithEncodingFileSystem.writeAllTextWithEncoding encoding path contentsWrites all text with the specified encoding through an explicit file-system service.
writeAllTextAsyncFileSystem.writeAllTextAsync path contentsAsynchronously writes all text through an explicit file-system service.
writeAllLinesFileSystem.writeAllLines path contentsWrites all lines through an explicit file-system service.
writeAllLinesWithEncodingFileSystem.writeAllLinesWithEncoding encoding path contentsWrites all lines with the specified encoding through an explicit file-system service.
writeAllLinesAsyncFileSystem.writeAllLinesAsync path contentsAsynchronously writes all lines through an explicit file-system service.
writeAllBytesFileSystem.writeAllBytes path contentsWrites all bytes through an explicit file-system service.
writeAllBytesAsyncFileSystem.writeAllBytesAsync path contentsAsynchronously writes all bytes through an explicit file-system service.
appendAllTextFileSystem.appendAllText path contentsAppends all text through an explicit file-system service.
appendAllTextWithEncodingFileSystem.appendAllTextWithEncoding encoding path contentsAppends all text with the specified encoding through an explicit file-system service.
appendAllTextAsyncFileSystem.appendAllTextAsync path contentsAsynchronously appends all text through an explicit file-system service.
appendAllLinesFileSystem.appendAllLines path contentsAppends all lines through an explicit file-system service.
appendAllLinesWithEncodingFileSystem.appendAllLinesWithEncoding encoding path contentsAppends all lines with the specified encoding through an explicit file-system service.
fileExistsFileSystem.fileExists pathChecks file existence through an explicit file-system service.
existsFileSystem.exists pathChecks file existence through an explicit file-system service.
deleteFileFileSystem.deleteFile pathDeletes a file through an explicit file-system service.
copyFileFileSystem.copyFile sourcePath destinationPath overwriteCopies a file through an explicit file-system service.
moveFileFileSystem.moveFile sourcePath destinationPath overwriteMoves a file through an explicit file-system service.
createFileSymbolicLinkFileSystem.createFileSymbolicLink linkPath targetPathCreates a symbolic link to a file through an explicit file-system service.
createDirectorySymbolicLinkFileSystem.createDirectorySymbolicLink linkPath targetPathCreates a symbolic link to a directory through an explicit file-system service.
getSymbolicLinkTargetFileSystem.getSymbolicLinkTarget pathReturns the immediate target stored in a symbolic link.
resolveSymbolicLinkTargetFileSystem.resolveSymbolicLinkTarget returnFinalTarget pathResolves a symbolic link target, optionally following the complete chain.
openFileFileSystem.openFile mode pathOpens a file with the specified mode through an explicit file-system service.
openFileWithAccessFileSystem.openFileWithAccess mode access pathOpens a file with the specified mode and access through an explicit file-system service.
openFileWithShareFileSystem.openFileWithShare mode access share pathOpens a file with the specified mode, access, and sharing behavior through an explicit file-system service.
openReadFileSystem.openRead pathOpens a file for reading through an explicit file-system service.
openTextFileSystem.openText pathOpens a text reader through an explicit file-system service.
openWriteFileSystem.openWrite pathOpens a file for writing through an explicit file-system service.
createFileFileSystem.createFile pathCreates or overwrites a file through an explicit file-system service.
createTextFileSystem.createText pathCreates a text writer through an explicit file-system service.
appendTextFileSystem.appendText pathCreates an append text writer through an explicit file-system service.
getFileAttributesFileSystem.getFileAttributes pathGets file attributes through an explicit file-system service.
setFileAttributesFileSystem.setFileAttributes path attributesSets file attributes through an explicit file-system service.
getFileCreationTimeFileSystem.getFileCreationTime pathGets file creation time through an explicit file-system service.
getFileCreationTimeUtcFileSystem.getFileCreationTimeUtc pathGets file creation time in UTC through an explicit file-system service.
setFileCreationTimeFileSystem.setFileCreationTime path timeSets file creation time through an explicit file-system service.
setFileCreationTimeUtcFileSystem.setFileCreationTimeUtc path timeSets file creation time in UTC through an explicit file-system service.
getFileLastAccessTimeFileSystem.getFileLastAccessTime pathGets file last access time through an explicit file-system service.
getFileLastAccessTimeUtcFileSystem.getFileLastAccessTimeUtc pathGets file last access time in UTC through an explicit file-system service.
setFileLastAccessTimeFileSystem.setFileLastAccessTime path timeSets file last access time through an explicit file-system service.
setFileLastAccessTimeUtcFileSystem.setFileLastAccessTimeUtc path timeSets file last access time in UTC through an explicit file-system service.
getFileLastWriteTimeFileSystem.getFileLastWriteTime pathGets file last write time through an explicit file-system service.
getFileLastWriteTimeUtcFileSystem.getFileLastWriteTimeUtc pathGets file last write time in UTC through an explicit file-system service.
setFileLastWriteTimeFileSystem.setFileLastWriteTime path timeSets file last write time through an explicit file-system service.
setFileLastWriteTimeUtcFileSystem.setFileLastWriteTimeUtc path timeSets file last write time in UTC through an explicit file-system service.
directoryExistsFileSystem.directoryExists pathChecks directory existence through an explicit file-system service.
createDirectoryFileSystem.createDirectory pathCreates a directory through an explicit file-system service.
deleteDirectoryFileSystem.deleteDirectory path recursiveDeletes a directory through an explicit file-system service.
moveDirectoryFileSystem.moveDirectory sourcePath destinationPathMoves a directory through an explicit file-system service.
enumerateFilesFileSystem.enumerateFiles path searchPattern searchOptionEnumerates files through an explicit file-system service.
getFilesFileSystem.getFiles path searchPattern searchOptionGets files through an explicit file-system service.
enumerateDirectoriesFileSystem.enumerateDirectories path searchPattern searchOptionEnumerates directories through an explicit file-system service.
getDirectoriesFileSystem.getDirectories path searchPattern searchOptionGets directories through an explicit file-system service.
enumerateFileSystemEntriesFileSystem.enumerateFileSystemEntries path searchPattern searchOptionEnumerates files and directories through an explicit file-system service.
getFileSystemEntriesFileSystem.getFileSystemEntries path searchPattern searchOptionGets files and directories through an explicit file-system service.
getLogicalDrivesFileSystem.getLogicalDrives Gets logical drives through an explicit file-system service.
getDirectoryRootFileSystem.getDirectoryRoot pathGets the directory root through an explicit file-system service.
getParentFileSystem.getParent pathGets the parent directory through an explicit file-system service.
getCurrentDirectoryFileSystem.getCurrentDirectory Gets the current working directory through an explicit file-system service.
setCurrentDirectoryFileSystem.setCurrentDirectory pathSets the current working directory through an explicit file-system service.
getDirectoryCreationTimeFileSystem.getDirectoryCreationTime pathGets directory creation time through an explicit file-system service.
getDirectoryCreationTimeUtcFileSystem.getDirectoryCreationTimeUtc pathGets directory creation time in UTC through an explicit file-system service.
setDirectoryCreationTimeFileSystem.setDirectoryCreationTime path timeSets directory creation time through an explicit file-system service.
setDirectoryCreationTimeUtcFileSystem.setDirectoryCreationTimeUtc path timeSets directory creation time in UTC through an explicit file-system service.
getDirectoryLastAccessTimeFileSystem.getDirectoryLastAccessTime pathGets directory last access time through an explicit file-system service.
getDirectoryLastAccessTimeUtcFileSystem.getDirectoryLastAccessTimeUtc pathGets directory last access time in UTC through an explicit file-system service.
setDirectoryLastAccessTimeFileSystem.setDirectoryLastAccessTime path timeSets directory last access time through an explicit file-system service.
setDirectoryLastAccessTimeUtcFileSystem.setDirectoryLastAccessTimeUtc path timeSets directory last access time in UTC through an explicit file-system service.
getDirectoryLastWriteTimeFileSystem.getDirectoryLastWriteTime pathGets directory last write time through an explicit file-system service.
getDirectoryLastWriteTimeUtcFileSystem.getDirectoryLastWriteTimeUtc pathGets directory last write time in UTC through an explicit file-system service.
setDirectoryLastWriteTimeFileSystem.setDirectoryLastWriteTime path timeSets directory last write time through an explicit file-system service.
setDirectoryLastWriteTimeUtcFileSystem.setDirectoryLastWriteTimeUtc path timeSets directory last write time in UTC through an explicit file-system service.
combineFileSystem.combine pathsCombines path segments through an explicit file-system service.
changeExtensionFileSystem.changeExtension path extensionChanges a path extension through an explicit file-system service.
getDirectoryNameFileSystem.getDirectoryName pathGets the directory name for a path through an explicit file-system service.
getInvalidFileNameCharsFileSystem.getInvalidFileNameChars Gets invalid file-name characters through an explicit file-system service.
getInvalidPathCharsFileSystem.getInvalidPathChars Gets invalid path characters through an explicit file-system service.
getExtensionFileSystem.getExtension pathGets the extension for a path through an explicit file-system service.
getFileNameFileSystem.getFileName pathGets the file name for a path through an explicit file-system service.
getFileNameWithoutExtensionFileSystem.getFileNameWithoutExtension pathGets the file name without extension for a path through an explicit file-system service.
getFullPathFileSystem.getFullPath pathGets the full path through an explicit file-system service.
getPathRootFileSystem.getPathRoot pathGets the path root through an explicit file-system service.
getRelativePathFileSystem.getRelativePath relativeTo pathGets a relative path through an explicit file-system service.
getTempPathFileSystem.getTempPath Gets the temporary directory path through an explicit file-system service.
getTempFileNameFileSystem.getTempFileName Creates a temporary file through an explicit file-system service and returns its path.
getRandomFileNameFileSystem.getRandomFileName Gets a random file name through an explicit file-system service.
hasExtensionFileSystem.hasExtension pathChecks whether a path has an extension through an explicit file-system service.
endsInDirectorySeparatorFileSystem.endsInDirectorySeparator pathChecks whether a path ends in a directory separator through an explicit file-system service.
trimEndingDirectorySeparatorFileSystem.trimEndingDirectorySeparator pathTrims one trailing directory separator through an explicit file-system service.
isPathFullyQualifiedFileSystem.isPathFullyQualified pathChecks whether a path is fully qualified through an explicit file-system service.
isPathRootedFileSystem.isPathRooted pathChecks whether a path is rooted through an explicit file-system service.
liveFileSystem.live Creates a live file-system service backed by , , and .

service

FileSystem.service
Member
Reads the file-system service from the environment.

Returns

Flow<'env, 'error, IFileSystem>

readAllText

FileSystem.readAllText path
Member
Reads all text through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, string>

readAllTextWithEncoding

FileSystem.readAllTextWithEncoding encoding path
Member
Reads all text with the specified encoding through an explicit file-system service.

Parameters

NameTypeDescription
encodingEncoding
pathstring

Returns

Flow<'env, FileSystemError, string>

readAllTextAsync

FileSystem.readAllTextAsync path
Member
Asynchronously reads all text through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, string>

readAllLines

FileSystem.readAllLines path
Member
Reads all lines through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, string array>

readAllLinesWithEncoding

FileSystem.readAllLinesWithEncoding encoding path
Member
Reads all lines with the specified encoding through an explicit file-system service.

Parameters

NameTypeDescription
encodingEncoding
pathstring

Returns

Flow<'env, FileSystemError, string array>

readAllLinesAsync

FileSystem.readAllLinesAsync path
Member
Asynchronously reads all lines through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, string array>

readAllBytes

FileSystem.readAllBytes path
Member
Reads all bytes through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, byte array>

readAllBytesAsync

FileSystem.readAllBytesAsync path
Member
Asynchronously reads all bytes through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, byte array>

writeAllText

FileSystem.writeAllText path contents
Member
Writes all text through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
contentsstring

Returns

Flow<'env, FileSystemError, unit>

writeAllTextWithEncoding

FileSystem.writeAllTextWithEncoding encoding path contents
Member
Writes all text with the specified encoding through an explicit file-system service.

Parameters

NameTypeDescription
encodingEncoding
pathstring
contentsstring

Returns

Flow<'env, FileSystemError, unit>

writeAllTextAsync

FileSystem.writeAllTextAsync path contents
Member
Asynchronously writes all text through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
contentsstring

Returns

Flow<'env, FileSystemError, unit>

writeAllLines

FileSystem.writeAllLines path contents
Member
Writes all lines through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
contentsstring seq

Returns

Flow<'env, FileSystemError, unit>

writeAllLinesWithEncoding

FileSystem.writeAllLinesWithEncoding encoding path contents
Member
Writes all lines with the specified encoding through an explicit file-system service.

Parameters

NameTypeDescription
encodingEncoding
pathstring
contentsstring seq

Returns

Flow<'env, FileSystemError, unit>

writeAllLinesAsync

FileSystem.writeAllLinesAsync path contents
Member
Asynchronously writes all lines through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
contentsstring seq

Returns

Flow<'env, FileSystemError, unit>

writeAllBytes

FileSystem.writeAllBytes path contents
Member
Writes all bytes through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
contentsbyte array

Returns

Flow<'env, FileSystemError, unit>

writeAllBytesAsync

FileSystem.writeAllBytesAsync path contents
Member
Asynchronously writes all bytes through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
contentsbyte array

Returns

Flow<'env, FileSystemError, unit>

appendAllText

FileSystem.appendAllText path contents
Member
Appends all text through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
contentsstring

Returns

Flow<'env, FileSystemError, unit>

appendAllTextWithEncoding

FileSystem.appendAllTextWithEncoding encoding path contents
Member
Appends all text with the specified encoding through an explicit file-system service.

Parameters

NameTypeDescription
encodingEncoding
pathstring
contentsstring

Returns

Flow<'env, FileSystemError, unit>

appendAllTextAsync

FileSystem.appendAllTextAsync path contents
Member
Asynchronously appends all text through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
contentsstring

Returns

Flow<'env, FileSystemError, unit>

appendAllLines

FileSystem.appendAllLines path contents
Member
Appends all lines through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
contentsstring seq

Returns

Flow<'env, FileSystemError, unit>

appendAllLinesWithEncoding

FileSystem.appendAllLinesWithEncoding encoding path contents
Member
Appends all lines with the specified encoding through an explicit file-system service.

Parameters

NameTypeDescription
encodingEncoding
pathstring
contentsstring seq

Returns

Flow<'env, FileSystemError, unit>

fileExists

FileSystem.fileExists path
Member
Checks file existence through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, bool>

exists

FileSystem.exists path
Member
Checks file existence through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, bool>

deleteFile

FileSystem.deleteFile path
Member
Deletes a file through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, unit>

copyFile

FileSystem.copyFile sourcePath destinationPath overwrite
Member
Copies a file through an explicit file-system service.

Parameters

NameTypeDescription
sourcePathstring
destinationPathstring
overwritebool

Returns

Flow<'env, FileSystemError, unit>

moveFile

FileSystem.moveFile sourcePath destinationPath overwrite
Member
Moves a file through an explicit file-system service.

Parameters

NameTypeDescription
sourcePathstring
destinationPathstring
overwritebool

Returns

Flow<'env, FileSystemError, unit>
FileSystem.createFileSymbolicLink linkPath targetPath
Member
Creates a symbolic link to a file through an explicit file-system service.

Parameters

NameTypeDescription
linkPathstring
targetPathstring

Returns

Flow<'env, FileSystemError, unit>

Verification Examples

FileSystem.createFileSymbolicLink "current.json" "releases/v2.json"
FileSystem.createDirectorySymbolicLink linkPath targetPath
Member
Creates a symbolic link to a directory through an explicit file-system service.

Parameters

NameTypeDescription
linkPathstring
targetPathstring

Returns

Flow<'env, FileSystemError, unit>

Verification Examples

FileSystem.createDirectorySymbolicLink "current" "releases/v2"

getSymbolicLinkTarget

FileSystem.getSymbolicLinkTarget path
Member
Returns the immediate target stored in a symbolic link.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, string option>

Verification Examples

FileSystem.getSymbolicLinkTarget "current"

resolveSymbolicLinkTarget

FileSystem.resolveSymbolicLinkTarget returnFinalTarget path
Member
Resolves a symbolic link target, optionally following the complete chain.

Parameters

NameTypeDescription
returnFinalTargetbool
pathstring

Returns

Flow<'env, FileSystemError, string option>

Verification Examples

FileSystem.resolveSymbolicLinkTarget true "current"

openFile

FileSystem.openFile mode path
Member
Opens a file with the specified mode through an explicit file-system service.

Parameters

NameTypeDescription
modeFileMode
pathstring

Returns

Flow<'env, FileSystemError, FileStream>

openFileWithAccess

FileSystem.openFileWithAccess mode access path
Member
Opens a file with the specified mode and access through an explicit file-system service.

Parameters

NameTypeDescription
modeFileMode
accessFileAccess
pathstring

Returns

Flow<'env, FileSystemError, FileStream>

openFileWithShare

FileSystem.openFileWithShare mode access share path
Member
Opens a file with the specified mode, access, and sharing behavior through an explicit file-system service.

Parameters

NameTypeDescription
modeFileMode
accessFileAccess
shareFileShare
pathstring

Returns

Flow<'env, FileSystemError, FileStream>

openRead

FileSystem.openRead path
Member
Opens a file for reading through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, Stream>

openText

FileSystem.openText path
Member
Opens a text reader through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, StreamReader>

openWrite

FileSystem.openWrite path
Member
Opens a file for writing through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, Stream>

createFile

FileSystem.createFile path
Member
Creates or overwrites a file through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, Stream>

createText

FileSystem.createText path
Member
Creates a text writer through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, StreamWriter>

appendText

FileSystem.appendText path
Member
Creates an append text writer through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, StreamWriter>

getFileAttributes

FileSystem.getFileAttributes path
Member
Gets file attributes through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, FileAttributes>

setFileAttributes

FileSystem.setFileAttributes path attributes
Member
Sets file attributes through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
attributesFileAttributes

Returns

Flow<'env, FileSystemError, unit>

getFileCreationTime

FileSystem.getFileCreationTime path
Member
Gets file creation time through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, DateTime>

getFileCreationTimeUtc

FileSystem.getFileCreationTimeUtc path
Member
Gets file creation time in UTC through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, DateTime>

setFileCreationTime

FileSystem.setFileCreationTime path time
Member
Sets file creation time through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
timeDateTime

Returns

Flow<'env, FileSystemError, unit>

setFileCreationTimeUtc

FileSystem.setFileCreationTimeUtc path time
Member
Sets file creation time in UTC through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
timeDateTime

Returns

Flow<'env, FileSystemError, unit>

getFileLastAccessTime

FileSystem.getFileLastAccessTime path
Member
Gets file last access time through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, DateTime>

getFileLastAccessTimeUtc

FileSystem.getFileLastAccessTimeUtc path
Member
Gets file last access time in UTC through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, DateTime>

setFileLastAccessTime

FileSystem.setFileLastAccessTime path time
Member
Sets file last access time through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
timeDateTime

Returns

Flow<'env, FileSystemError, unit>

setFileLastAccessTimeUtc

FileSystem.setFileLastAccessTimeUtc path time
Member
Sets file last access time in UTC through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
timeDateTime

Returns

Flow<'env, FileSystemError, unit>

getFileLastWriteTime

FileSystem.getFileLastWriteTime path
Member
Gets file last write time through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, DateTime>

getFileLastWriteTimeUtc

FileSystem.getFileLastWriteTimeUtc path
Member
Gets file last write time in UTC through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, DateTime>

setFileLastWriteTime

FileSystem.setFileLastWriteTime path time
Member
Sets file last write time through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
timeDateTime

Returns

Flow<'env, FileSystemError, unit>

setFileLastWriteTimeUtc

FileSystem.setFileLastWriteTimeUtc path time
Member
Sets file last write time in UTC through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
timeDateTime

Returns

Flow<'env, FileSystemError, unit>

directoryExists

FileSystem.directoryExists path
Member
Checks directory existence through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, bool>

createDirectory

FileSystem.createDirectory path
Member
Creates a directory through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, unit>

deleteDirectory

FileSystem.deleteDirectory path recursive
Member
Deletes a directory through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
recursivebool

Returns

Flow<'env, FileSystemError, unit>

moveDirectory

FileSystem.moveDirectory sourcePath destinationPath
Member
Moves a directory through an explicit file-system service.

Parameters

NameTypeDescription
sourcePathstring
destinationPathstring

Returns

Flow<'env, FileSystemError, unit>

enumerateFiles

FileSystem.enumerateFiles path searchPattern searchOption
Member
Enumerates files through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
searchPatternstring
searchOptionSearchOption

Returns

Flow<'env, FileSystemError, string seq>

getFiles

FileSystem.getFiles path searchPattern searchOption
Member
Gets files through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
searchPatternstring
searchOptionSearchOption

Returns

Flow<'env, FileSystemError, string array>

enumerateDirectories

FileSystem.enumerateDirectories path searchPattern searchOption
Member
Enumerates directories through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
searchPatternstring
searchOptionSearchOption

Returns

Flow<'env, FileSystemError, string seq>

getDirectories

FileSystem.getDirectories path searchPattern searchOption
Member
Gets directories through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
searchPatternstring
searchOptionSearchOption

Returns

Flow<'env, FileSystemError, string array>

enumerateFileSystemEntries

FileSystem.enumerateFileSystemEntries path searchPattern searchOption
Member
Enumerates files and directories through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
searchPatternstring
searchOptionSearchOption

Returns

Flow<'env, FileSystemError, string seq>

getFileSystemEntries

FileSystem.getFileSystemEntries path searchPattern searchOption
Member
Gets files and directories through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
searchPatternstring
searchOptionSearchOption

Returns

Flow<'env, FileSystemError, string array>

getLogicalDrives

FileSystem.getLogicalDrives
Member
Gets logical drives through an explicit file-system service.

Returns

Flow<'env, FileSystemError, string array>

getDirectoryRoot

FileSystem.getDirectoryRoot path
Member
Gets the directory root through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, string>

getParent

FileSystem.getParent path
Member
Gets the parent directory through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, string option>

getCurrentDirectory

FileSystem.getCurrentDirectory
Member
Gets the current working directory through an explicit file-system service.

Returns

Flow<'env, FileSystemError, string>

setCurrentDirectory

FileSystem.setCurrentDirectory path
Member
Sets the current working directory through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, unit>

getDirectoryCreationTime

FileSystem.getDirectoryCreationTime path
Member
Gets directory creation time through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, DateTime>

getDirectoryCreationTimeUtc

FileSystem.getDirectoryCreationTimeUtc path
Member
Gets directory creation time in UTC through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, DateTime>

setDirectoryCreationTime

FileSystem.setDirectoryCreationTime path time
Member
Sets directory creation time through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
timeDateTime

Returns

Flow<'env, FileSystemError, unit>

setDirectoryCreationTimeUtc

FileSystem.setDirectoryCreationTimeUtc path time
Member
Sets directory creation time in UTC through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
timeDateTime

Returns

Flow<'env, FileSystemError, unit>

getDirectoryLastAccessTime

FileSystem.getDirectoryLastAccessTime path
Member
Gets directory last access time through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, DateTime>

getDirectoryLastAccessTimeUtc

FileSystem.getDirectoryLastAccessTimeUtc path
Member
Gets directory last access time in UTC through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, DateTime>

setDirectoryLastAccessTime

FileSystem.setDirectoryLastAccessTime path time
Member
Sets directory last access time through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
timeDateTime

Returns

Flow<'env, FileSystemError, unit>

setDirectoryLastAccessTimeUtc

FileSystem.setDirectoryLastAccessTimeUtc path time
Member
Sets directory last access time in UTC through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
timeDateTime

Returns

Flow<'env, FileSystemError, unit>

getDirectoryLastWriteTime

FileSystem.getDirectoryLastWriteTime path
Member
Gets directory last write time through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, DateTime>

getDirectoryLastWriteTimeUtc

FileSystem.getDirectoryLastWriteTimeUtc path
Member
Gets directory last write time in UTC through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, DateTime>

setDirectoryLastWriteTime

FileSystem.setDirectoryLastWriteTime path time
Member
Sets directory last write time through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
timeDateTime

Returns

Flow<'env, FileSystemError, unit>

setDirectoryLastWriteTimeUtc

FileSystem.setDirectoryLastWriteTimeUtc path time
Member
Sets directory last write time in UTC through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
timeDateTime

Returns

Flow<'env, FileSystemError, unit>

combine

FileSystem.combine paths
Member
Combines path segments through an explicit file-system service.

Parameters

NameTypeDescription
pathsstring array

Returns

Flow<'env, FileSystemError, string>

changeExtension

FileSystem.changeExtension path extension
Member
Changes a path extension through an explicit file-system service.

Parameters

NameTypeDescription
pathstring
extensionstring

Returns

Flow<'env, FileSystemError, string>

getDirectoryName

FileSystem.getDirectoryName path
Member
Gets the directory name for a path through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, string option>

getInvalidFileNameChars

FileSystem.getInvalidFileNameChars
Member
Gets invalid file-name characters through an explicit file-system service.

Returns

Flow<'env, FileSystemError, char array>

getInvalidPathChars

FileSystem.getInvalidPathChars
Member
Gets invalid path characters through an explicit file-system service.

Returns

Flow<'env, FileSystemError, char array>

getExtension

FileSystem.getExtension path
Member
Gets the extension for a path through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, string>

getFileName

FileSystem.getFileName path
Member
Gets the file name for a path through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, string>

getFileNameWithoutExtension

FileSystem.getFileNameWithoutExtension path
Member
Gets the file name without extension for a path through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, string>

getFullPath

FileSystem.getFullPath path
Member
Gets the full path through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, string>

getPathRoot

FileSystem.getPathRoot path
Member
Gets the path root through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, string option>

getRelativePath

FileSystem.getRelativePath relativeTo path
Member
Gets a relative path through an explicit file-system service.

Parameters

NameTypeDescription
relativeTostring
pathstring

Returns

Flow<'env, FileSystemError, string>

getTempPath

FileSystem.getTempPath
Member
Gets the temporary directory path through an explicit file-system service.

Returns

Flow<'env, FileSystemError, string>

getTempFileName

FileSystem.getTempFileName
Member
Creates a temporary file through an explicit file-system service and returns its path.

Returns

Flow<'env, FileSystemError, string>

getRandomFileName

FileSystem.getRandomFileName
Member
Gets a random file name through an explicit file-system service.

Returns

Flow<'env, FileSystemError, string>

hasExtension

FileSystem.hasExtension path
Member
Checks whether a path has an extension through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, bool>

endsInDirectorySeparator

FileSystem.endsInDirectorySeparator path
Member
Checks whether a path ends in a directory separator through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, bool>

trimEndingDirectorySeparator

FileSystem.trimEndingDirectorySeparator path
Member
Trims one trailing directory separator through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, string>

isPathFullyQualified

FileSystem.isPathFullyQualified path
Member
Checks whether a path is fully qualified through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, bool>

isPathRooted

FileSystem.isPathRooted path
Member
Checks whether a path is rooted through an explicit file-system service.

Parameters

NameTypeDescription
pathstring

Returns

Flow<'env, FileSystemError, bool>

live

FileSystem.live
Member
Creates a live file-system service backed by File, Directory, and Path.

Returns

IFileSystem