IFileSystemType

PackageAxial.FileSystem
Provides access to common file, directory, and path operations.

Specification

Kind
Type
Members
98
Examples
0
AppendAllLinesSignature
this.AppendAllLines
AppendAllLinesSignature
this.AppendAllLines
AppendAllTextSignature
this.AppendAllText
AppendAllTextSignature
this.AppendAllText
AppendAllTextAsyncSignature
this.AppendAllTextAsync

Summary

NameSignatureSynopsis
AppendAllLinesthis.AppendAllLinesAppends lines to a file with the specified encoding, creating the file if needed.
AppendAllLinesthis.AppendAllLinesAppends lines to a file, creating the file if needed.
AppendAllTextthis.AppendAllTextAppends text to a file with the specified encoding, creating the file if needed.
AppendAllTextthis.AppendAllTextAppends text to a file, creating the file if needed.
AppendAllTextAsyncthis.AppendAllTextAsyncAsynchronously appends text to a file, creating the file if needed.
AppendTextthis.AppendTextOpens a UTF-8 text writer that appends to a file, creating the file if needed.
ChangeExtensionthis.ChangeExtensionChanges the extension of a path.
Combinethis.CombineCombines path segments into one path.
CopyFilethis.CopyFileCopies a file to a destination path.
CreateDirectorythis.CreateDirectoryCreates a directory and any missing parent directories.
CreateDirectorySymbolicLinkthis.CreateDirectorySymbolicLinkCreates a symbolic link to a directory.
CreateFilethis.CreateFileCreates or overwrites a file and returns the open stream.
CreateFileSymbolicLinkthis.CreateFileSymbolicLinkCreates a symbolic link to a file.
CreateTextthis.CreateTextCreates or overwrites a UTF-8 text file and returns the open writer.
DeleteDirectorythis.DeleteDirectoryDeletes a directory.
DeleteFilethis.DeleteFileDeletes the specified file if it exists.
DirectoryExiststhis.DirectoryExistsDetermines whether the specified directory exists.
EndsInDirectorySeparatorthis.EndsInDirectorySeparatorReturns whether a path ends in a directory separator.
EnumerateDirectoriesthis.EnumerateDirectoriesEnumerates directories in a directory.
EnumerateFileSystemEntriesthis.EnumerateFileSystemEntriesEnumerates files and directories in a directory.
EnumerateFilesthis.EnumerateFilesEnumerates files in a directory.
FileExiststhis.FileExistsDetermines whether the specified file exists.
GetCurrentDirectorythis.GetCurrentDirectoryGets the current working directory.
GetDirectoriesthis.GetDirectoriesGets directories in a directory.
GetDirectoryCreationTimethis.GetDirectoryCreationTimeGets directory creation time.
GetDirectoryCreationTimeUtcthis.GetDirectoryCreationTimeUtcGets directory creation time in UTC.
GetDirectoryLastAccessTimethis.GetDirectoryLastAccessTimeGets directory last access time.
GetDirectoryLastAccessTimeUtcthis.GetDirectoryLastAccessTimeUtcGets directory last access time in UTC.
GetDirectoryLastWriteTimethis.GetDirectoryLastWriteTimeGets directory last write time.
GetDirectoryLastWriteTimeUtcthis.GetDirectoryLastWriteTimeUtcGets directory last write time in UTC.
GetDirectoryNamethis.GetDirectoryNameReturns the directory name for a path.
GetDirectoryRootthis.GetDirectoryRootGets the root portion of a directory path.
GetExtensionthis.GetExtensionReturns the extension for a path.
GetFileAttributesthis.GetFileAttributesGets file attributes.
GetFileCreationTimethis.GetFileCreationTimeGets file creation time.
GetFileCreationTimeUtcthis.GetFileCreationTimeUtcGets file creation time in UTC.
GetFileLastAccessTimethis.GetFileLastAccessTimeGets file last access time.
GetFileLastAccessTimeUtcthis.GetFileLastAccessTimeUtcGets file last access time in UTC.
GetFileLastWriteTimethis.GetFileLastWriteTimeGets file last write time.
GetFileLastWriteTimeUtcthis.GetFileLastWriteTimeUtcGets file last write time in UTC.
GetFileNamethis.GetFileNameReturns the file name for a path.
GetFileNameWithoutExtensionthis.GetFileNameWithoutExtensionReturns the file name without extension for a path.
GetFileSystemEntriesthis.GetFileSystemEntriesGets files and directories in a directory.
GetFilesthis.GetFilesGets files in a directory.
GetFullPaththis.GetFullPathReturns the full path for a path.
GetInvalidFileNameCharsthis.GetInvalidFileNameCharsReturns invalid file-name characters for the platform.
GetInvalidPathCharsthis.GetInvalidPathCharsReturns invalid path characters for the platform.
GetLogicalDrivesthis.GetLogicalDrivesGets logical drives for the current machine.
GetParentthis.GetParentGets the parent directory path.
GetPathRootthis.GetPathRootReturns the root portion of a path.
GetRandomFileNamethis.GetRandomFileNameReturns a random file or directory name.
GetRelativePaththis.GetRelativePathReturns a path relative to another path.
GetSymbolicLinkTargetthis.GetSymbolicLinkTargetReturns the immediate target stored in a symbolic link, or None when the path is not a link.
GetTempFileNamethis.GetTempFileNameCreates a uniquely named zero-byte temporary file and returns its path.
GetTempPaththis.GetTempPathReturns the temporary directory path.
HasExtensionthis.HasExtensionReturns whether a path has an extension.
IsPathFullyQualifiedthis.IsPathFullyQualifiedReturns whether a path is fully qualified.
IsPathRootedthis.IsPathRootedReturns whether a path contains a root.
MoveDirectorythis.MoveDirectoryMoves a directory to a destination path.
MoveFilethis.MoveFileMoves a file to a destination path.
OpenFilethis.OpenFileOpens a file with the specified mode, access, and sharing behavior.
OpenFilethis.OpenFileOpens a file with the specified mode and access.
OpenFilethis.OpenFileOpens a file with the specified mode.
OpenReadthis.OpenReadOpens an existing file for reading.
OpenTextthis.OpenTextOpens an existing UTF-8 text file for reading.
OpenWritethis.OpenWriteOpens a file for writing, creating it if needed.
ReadAllBytesthis.ReadAllBytesOpens a binary file, reads all bytes, and then closes the file.
ReadAllBytesAsyncthis.ReadAllBytesAsyncAsynchronously opens a binary file, reads all bytes, and then closes the file.
ReadAllLinesthis.ReadAllLinesOpens a text file with the specified encoding, reads all lines, and then closes the file.
ReadAllLinesthis.ReadAllLinesOpens a text file, reads all lines, and then closes the file.
ReadAllLinesAsyncthis.ReadAllLinesAsyncAsynchronously opens a text file, reads all lines, and then closes the file.
ReadAllTextthis.ReadAllTextOpens a text file with the specified encoding, reads all text, and then closes the file.
ReadAllTextthis.ReadAllTextOpens a text file, reads all text, and then closes the file.
ReadAllTextAsyncthis.ReadAllTextAsyncAsynchronously opens a text file, reads all text, and then closes the file.
ResolveSymbolicLinkTargetthis.ResolveSymbolicLinkTargetResolves a symbolic link target and optionally follows the complete link chain.
SetCurrentDirectorythis.SetCurrentDirectorySets the current working directory.
SetDirectoryCreationTimethis.SetDirectoryCreationTimeSets directory creation time.
SetDirectoryCreationTimeUtcthis.SetDirectoryCreationTimeUtcSets directory creation time in UTC.
SetDirectoryLastAccessTimethis.SetDirectoryLastAccessTimeSets directory last access time.
SetDirectoryLastAccessTimeUtcthis.SetDirectoryLastAccessTimeUtcSets directory last access time in UTC.
SetDirectoryLastWriteTimethis.SetDirectoryLastWriteTimeSets directory last write time.
SetDirectoryLastWriteTimeUtcthis.SetDirectoryLastWriteTimeUtcSets directory last write time in UTC.
SetFileAttributesthis.SetFileAttributesSets file attributes.
SetFileCreationTimethis.SetFileCreationTimeSets file creation time.
SetFileCreationTimeUtcthis.SetFileCreationTimeUtcSets file creation time in UTC.
SetFileLastAccessTimethis.SetFileLastAccessTimeSets file last access time.
SetFileLastAccessTimeUtcthis.SetFileLastAccessTimeUtcSets file last access time in UTC.
SetFileLastWriteTimethis.SetFileLastWriteTimeSets file last write time.
SetFileLastWriteTimeUtcthis.SetFileLastWriteTimeUtcSets file last write time in UTC.
TrimEndingDirectorySeparatorthis.TrimEndingDirectorySeparatorTrims one trailing directory separator from a path.
WriteAllBytesthis.WriteAllBytesCreates or overwrites a binary file, writes all bytes, and then closes the file.
WriteAllBytesAsyncthis.WriteAllBytesAsyncAsynchronously creates or overwrites a binary file, writes all bytes, and then closes the file.
WriteAllLinesthis.WriteAllLinesCreates or overwrites a text file with the specified encoding, writes all lines, and then closes the file.
WriteAllLinesthis.WriteAllLinesCreates or overwrites a text file, writes all lines, and then closes the file.
WriteAllLinesAsyncthis.WriteAllLinesAsyncAsynchronously creates or overwrites a text file, writes all lines, and then closes the file.
WriteAllTextthis.WriteAllTextCreates or overwrites a text file with the specified encoding, writes all text, and then closes the file.
WriteAllTextthis.WriteAllTextCreates or overwrites a text file, writes all text, and then closes the file.
WriteAllTextAsyncthis.WriteAllTextAsyncAsynchronously creates or overwrites a text file, writes all text, and then closes the file.

AppendAllLines

this.AppendAllLines
Member
Appends lines to a file with the specified encoding, creating the file if needed.

Parameters

NameTypeDescription
pathstring
contentsstring seq
encodingEncoding

Returns

unit

AppendAllLines

this.AppendAllLines
Member
Appends lines to a file, creating the file if needed.

Parameters

NameTypeDescription
pathstring
contentsstring seq

Returns

unit

AppendAllText

this.AppendAllText
Member
Appends text to a file with the specified encoding, creating the file if needed.

Parameters

NameTypeDescription
pathstring
contentsstring
encodingEncoding

Returns

unit

AppendAllText

this.AppendAllText
Member
Appends text to a file, creating the file if needed.

Parameters

NameTypeDescription
pathstring
contentsstring

Returns

unit

AppendAllTextAsync

this.AppendAllTextAsync
Member
Asynchronously appends text to a file, creating the file if needed.

Parameters

NameTypeDescription
pathstring
contentsstring
cancellationTokenCancellationToken

Returns

Task

AppendText

this.AppendText
Member
Opens a UTF-8 text writer that appends to a file, creating the file if needed.

Parameters

NameTypeDescription
pathstring

Returns

StreamWriter

ChangeExtension

this.ChangeExtension
Member
Changes the extension of a path.

Parameters

NameTypeDescription
pathstring
extensionstring

Returns

string

Combine

this.Combine
Member
Combines path segments into one path.

Parameters

NameTypeDescription
pathsstring array

Returns

string

CopyFile

this.CopyFile
Member
Copies a file to a destination path.

Parameters

NameTypeDescription
sourcePathstring
destinationPathstring
overwritebool

Returns

unit

CreateDirectory

this.CreateDirectory
Member
Creates a directory and any missing parent directories.

Parameters

NameTypeDescription
pathstring

Returns

unit
this.CreateDirectorySymbolicLink
Member
Creates a symbolic link to a directory.

Parameters

NameTypeDescription
linkPathstring
targetPathstring

Returns

unit

CreateFile

this.CreateFile
Member
Creates or overwrites a file and returns the open stream.

Parameters

NameTypeDescription
pathstring

Returns

Stream
this.CreateFileSymbolicLink
Member
Creates a symbolic link to a file.

Parameters

NameTypeDescription
linkPathstring
targetPathstring

Returns

unit

CreateText

this.CreateText
Member
Creates or overwrites a UTF-8 text file and returns the open writer.

Parameters

NameTypeDescription
pathstring

Returns

StreamWriter

DeleteDirectory

this.DeleteDirectory
Member
Deletes a directory.

Parameters

NameTypeDescription
pathstring
recursivebool

Returns

unit

DeleteFile

this.DeleteFile
Member
Deletes the specified file if it exists.

Parameters

NameTypeDescription
pathstring

Returns

unit

DirectoryExists

this.DirectoryExists
Member
Determines whether the specified directory exists.

Parameters

NameTypeDescription
pathstring

Returns

bool

EndsInDirectorySeparator

this.EndsInDirectorySeparator
Member
Returns whether a path ends in a directory separator.

Parameters

NameTypeDescription
pathstring

Returns

bool

EnumerateDirectories

this.EnumerateDirectories
Member
Enumerates directories in a directory.

Parameters

NameTypeDescription
pathstring
searchPatternstring
searchOptionSearchOption

Returns

string seq

EnumerateFileSystemEntries

this.EnumerateFileSystemEntries
Member
Enumerates files and directories in a directory.

Parameters

NameTypeDescription
pathstring
searchPatternstring
searchOptionSearchOption

Returns

string seq

EnumerateFiles

this.EnumerateFiles
Member
Enumerates files in a directory.

Parameters

NameTypeDescription
pathstring
searchPatternstring
searchOptionSearchOption

Returns

string seq

FileExists

this.FileExists
Member
Determines whether the specified file exists.

Parameters

NameTypeDescription
pathstring

Returns

bool

GetCurrentDirectory

this.GetCurrentDirectory
Member
Gets the current working directory.

Returns

string

GetDirectories

this.GetDirectories
Member
Gets directories in a directory.

Parameters

NameTypeDescription
pathstring
searchPatternstring
searchOptionSearchOption

Returns

string array

GetDirectoryCreationTime

this.GetDirectoryCreationTime
Member
Gets directory creation time.

Parameters

NameTypeDescription
pathstring

Returns

DateTime

GetDirectoryCreationTimeUtc

this.GetDirectoryCreationTimeUtc
Member
Gets directory creation time in UTC.

Parameters

NameTypeDescription
pathstring

Returns

DateTime

GetDirectoryLastAccessTime

this.GetDirectoryLastAccessTime
Member
Gets directory last access time.

Parameters

NameTypeDescription
pathstring

Returns

DateTime

GetDirectoryLastAccessTimeUtc

this.GetDirectoryLastAccessTimeUtc
Member
Gets directory last access time in UTC.

Parameters

NameTypeDescription
pathstring

Returns

DateTime

GetDirectoryLastWriteTime

this.GetDirectoryLastWriteTime
Member
Gets directory last write time.

Parameters

NameTypeDescription
pathstring

Returns

DateTime

GetDirectoryLastWriteTimeUtc

this.GetDirectoryLastWriteTimeUtc
Member
Gets directory last write time in UTC.

Parameters

NameTypeDescription
pathstring

Returns

DateTime

GetDirectoryName

this.GetDirectoryName
Member
Returns the directory name for a path.

Parameters

NameTypeDescription
pathstring

Returns

string option

GetDirectoryRoot

this.GetDirectoryRoot
Member
Gets the root portion of a directory path.

Parameters

NameTypeDescription
pathstring

Returns

string

GetExtension

this.GetExtension
Member
Returns the extension for a path.

Parameters

NameTypeDescription
pathstring

Returns

string

GetFileAttributes

this.GetFileAttributes
Member
Gets file attributes.

Parameters

NameTypeDescription
pathstring

Returns

FileAttributes

GetFileCreationTime

this.GetFileCreationTime
Member
Gets file creation time.

Parameters

NameTypeDescription
pathstring

Returns

DateTime

GetFileCreationTimeUtc

this.GetFileCreationTimeUtc
Member
Gets file creation time in UTC.

Parameters

NameTypeDescription
pathstring

Returns

DateTime

GetFileLastAccessTime

this.GetFileLastAccessTime
Member
Gets file last access time.

Parameters

NameTypeDescription
pathstring

Returns

DateTime

GetFileLastAccessTimeUtc

this.GetFileLastAccessTimeUtc
Member
Gets file last access time in UTC.

Parameters

NameTypeDescription
pathstring

Returns

DateTime

GetFileLastWriteTime

this.GetFileLastWriteTime
Member
Gets file last write time.

Parameters

NameTypeDescription
pathstring

Returns

DateTime

GetFileLastWriteTimeUtc

this.GetFileLastWriteTimeUtc
Member
Gets file last write time in UTC.

Parameters

NameTypeDescription
pathstring

Returns

DateTime

GetFileName

this.GetFileName
Member
Returns the file name for a path.

Parameters

NameTypeDescription
pathstring

Returns

string

GetFileNameWithoutExtension

this.GetFileNameWithoutExtension
Member
Returns the file name without extension for a path.

Parameters

NameTypeDescription
pathstring

Returns

string

GetFileSystemEntries

this.GetFileSystemEntries
Member
Gets files and directories in a directory.

Parameters

NameTypeDescription
pathstring
searchPatternstring
searchOptionSearchOption

Returns

string array

GetFiles

this.GetFiles
Member
Gets files in a directory.

Parameters

NameTypeDescription
pathstring
searchPatternstring
searchOptionSearchOption

Returns

string array

GetFullPath

this.GetFullPath
Member
Returns the full path for a path.

Parameters

NameTypeDescription
pathstring

Returns

string

GetInvalidFileNameChars

this.GetInvalidFileNameChars
Member
Returns invalid file-name characters for the platform.

Returns

char array

GetInvalidPathChars

this.GetInvalidPathChars
Member
Returns invalid path characters for the platform.

Returns

char array

GetLogicalDrives

this.GetLogicalDrives
Member
Gets logical drives for the current machine.

Returns

string array

GetParent

this.GetParent
Member
Gets the parent directory path.

Parameters

NameTypeDescription
pathstring

Returns

string option

GetPathRoot

this.GetPathRoot
Member
Returns the root portion of a path.

Parameters

NameTypeDescription
pathstring

Returns

string option

GetRandomFileName

this.GetRandomFileName
Member
Returns a random file or directory name.

Returns

string

GetRelativePath

this.GetRelativePath
Member
Returns a path relative to another path.

Parameters

NameTypeDescription
relativeTostring
pathstring

Returns

string

GetSymbolicLinkTarget

this.GetSymbolicLinkTarget
Member
Returns the immediate target stored in a symbolic link, or None when the path is not a link.

Parameters

NameTypeDescription
pathstring

Returns

string option

GetTempFileName

this.GetTempFileName
Member
Creates a uniquely named zero-byte temporary file and returns its path.

Returns

string

GetTempPath

this.GetTempPath
Member
Returns the temporary directory path.

Returns

string

HasExtension

this.HasExtension
Member
Returns whether a path has an extension.

Parameters

NameTypeDescription
pathstring

Returns

bool

IsPathFullyQualified

this.IsPathFullyQualified
Member
Returns whether a path is fully qualified.

Parameters

NameTypeDescription
pathstring

Returns

bool

IsPathRooted

this.IsPathRooted
Member
Returns whether a path contains a root.

Parameters

NameTypeDescription
pathstring

Returns

bool

MoveDirectory

this.MoveDirectory
Member
Moves a directory to a destination path.

Parameters

NameTypeDescription
sourcePathstring
destinationPathstring

Returns

unit

MoveFile

this.MoveFile
Member
Moves a file to a destination path.

Parameters

NameTypeDescription
sourcePathstring
destinationPathstring
overwritebool

Returns

unit

OpenFile

this.OpenFile
Member
Opens a file with the specified mode, access, and sharing behavior.

Parameters

NameTypeDescription
pathstring
modeFileMode
accessFileAccess
shareFileShare

Returns

FileStream

OpenFile

this.OpenFile
Member
Opens a file with the specified mode and access.

Parameters

NameTypeDescription
pathstring
modeFileMode
accessFileAccess

Returns

FileStream

OpenFile

this.OpenFile
Member
Opens a file with the specified mode.

Parameters

NameTypeDescription
pathstring
modeFileMode

Returns

FileStream

OpenRead

this.OpenRead
Member
Opens an existing file for reading.

Parameters

NameTypeDescription
pathstring

Returns

Stream

OpenText

this.OpenText
Member
Opens an existing UTF-8 text file for reading.

Parameters

NameTypeDescription
pathstring

Returns

StreamReader

OpenWrite

this.OpenWrite
Member
Opens a file for writing, creating it if needed.

Parameters

NameTypeDescription
pathstring

Returns

Stream

ReadAllBytes

this.ReadAllBytes
Member
Opens a binary file, reads all bytes, and then closes the file.

Parameters

NameTypeDescription
pathstring

Returns

byte array

ReadAllBytesAsync

this.ReadAllBytesAsync
Member
Asynchronously opens a binary file, reads all bytes, and then closes the file.

Parameters

NameTypeDescription
pathstring
cancellationTokenCancellationToken

Returns

Task<byte array>

ReadAllLines

this.ReadAllLines
Member
Opens a text file with the specified encoding, reads all lines, and then closes the file.

Parameters

NameTypeDescription
pathstring
encodingEncoding

Returns

string array

ReadAllLines

this.ReadAllLines
Member
Opens a text file, reads all lines, and then closes the file.

Parameters

NameTypeDescription
pathstring

Returns

string array

ReadAllLinesAsync

this.ReadAllLinesAsync
Member
Asynchronously opens a text file, reads all lines, and then closes the file.

Parameters

NameTypeDescription
pathstring
cancellationTokenCancellationToken

Returns

Task<string array>

ReadAllText

this.ReadAllText
Member
Opens a text file with the specified encoding, reads all text, and then closes the file.

Parameters

NameTypeDescription
pathstring
encodingEncoding

Returns

string

ReadAllText

this.ReadAllText
Member
Opens a text file, reads all text, and then closes the file.

Parameters

NameTypeDescription
pathstring

Returns

string

ReadAllTextAsync

this.ReadAllTextAsync
Member
Asynchronously opens a text file, reads all text, and then closes the file.

Parameters

NameTypeDescription
pathstring
cancellationTokenCancellationToken

Returns

Task<string>

ResolveSymbolicLinkTarget

this.ResolveSymbolicLinkTarget
Member
Resolves a symbolic link target and optionally follows the complete link chain.

Parameters

NameTypeDescription
pathstring
returnFinalTargetbool

Returns

string option

SetCurrentDirectory

this.SetCurrentDirectory
Member
Sets the current working directory.

Parameters

NameTypeDescription
pathstring

Returns

unit

SetDirectoryCreationTime

this.SetDirectoryCreationTime
Member
Sets directory creation time.

Parameters

NameTypeDescription
pathstring
creationTimeDateTime

Returns

unit

SetDirectoryCreationTimeUtc

this.SetDirectoryCreationTimeUtc
Member
Sets directory creation time in UTC.

Parameters

NameTypeDescription
pathstring
creationTimeUtcDateTime

Returns

unit

SetDirectoryLastAccessTime

this.SetDirectoryLastAccessTime
Member
Sets directory last access time.

Parameters

NameTypeDescription
pathstring
lastAccessTimeDateTime

Returns

unit

SetDirectoryLastAccessTimeUtc

this.SetDirectoryLastAccessTimeUtc
Member
Sets directory last access time in UTC.

Parameters

NameTypeDescription
pathstring
lastAccessTimeUtcDateTime

Returns

unit

SetDirectoryLastWriteTime

this.SetDirectoryLastWriteTime
Member
Sets directory last write time.

Parameters

NameTypeDescription
pathstring
lastWriteTimeDateTime

Returns

unit

SetDirectoryLastWriteTimeUtc

this.SetDirectoryLastWriteTimeUtc
Member
Sets directory last write time in UTC.

Parameters

NameTypeDescription
pathstring
lastWriteTimeUtcDateTime

Returns

unit

SetFileAttributes

this.SetFileAttributes
Member
Sets file attributes.

Parameters

NameTypeDescription
pathstring
attributesFileAttributes

Returns

unit

SetFileCreationTime

this.SetFileCreationTime
Member
Sets file creation time.

Parameters

NameTypeDescription
pathstring
creationTimeDateTime

Returns

unit

SetFileCreationTimeUtc

this.SetFileCreationTimeUtc
Member
Sets file creation time in UTC.

Parameters

NameTypeDescription
pathstring
creationTimeUtcDateTime

Returns

unit

SetFileLastAccessTime

this.SetFileLastAccessTime
Member
Sets file last access time.

Parameters

NameTypeDescription
pathstring
lastAccessTimeDateTime

Returns

unit

SetFileLastAccessTimeUtc

this.SetFileLastAccessTimeUtc
Member
Sets file last access time in UTC.

Parameters

NameTypeDescription
pathstring
lastAccessTimeUtcDateTime

Returns

unit

SetFileLastWriteTime

this.SetFileLastWriteTime
Member
Sets file last write time.

Parameters

NameTypeDescription
pathstring
lastWriteTimeDateTime

Returns

unit

SetFileLastWriteTimeUtc

this.SetFileLastWriteTimeUtc
Member
Sets file last write time in UTC.

Parameters

NameTypeDescription
pathstring
lastWriteTimeUtcDateTime

Returns

unit

TrimEndingDirectorySeparator

this.TrimEndingDirectorySeparator
Member
Trims one trailing directory separator from a path.

Parameters

NameTypeDescription
pathstring

Returns

string

WriteAllBytes

this.WriteAllBytes
Member
Creates or overwrites a binary file, writes all bytes, and then closes the file.

Parameters

NameTypeDescription
pathstring
contentsbyte array

Returns

unit

WriteAllBytesAsync

this.WriteAllBytesAsync
Member
Asynchronously creates or overwrites a binary file, writes all bytes, and then closes the file.

Parameters

NameTypeDescription
pathstring
contentsbyte array
cancellationTokenCancellationToken

Returns

Task

WriteAllLines

this.WriteAllLines
Member
Creates or overwrites a text file with the specified encoding, writes all lines, and then closes the file.

Parameters

NameTypeDescription
pathstring
contentsstring seq
encodingEncoding

Returns

unit

WriteAllLines

this.WriteAllLines
Member
Creates or overwrites a text file, writes all lines, and then closes the file.

Parameters

NameTypeDescription
pathstring
contentsstring seq

Returns

unit

WriteAllLinesAsync

this.WriteAllLinesAsync
Member
Asynchronously creates or overwrites a text file, writes all lines, and then closes the file.

Parameters

NameTypeDescription
pathstring
contentsstring seq
cancellationTokenCancellationToken

Returns

Task

WriteAllText

this.WriteAllText
Member
Creates or overwrites a text file with the specified encoding, writes all text, and then closes the file.

Parameters

NameTypeDescription
pathstring
contentsstring
encodingEncoding

Returns

unit

WriteAllText

this.WriteAllText
Member
Creates or overwrites a text file, writes all text, and then closes the file.

Parameters

NameTypeDescription
pathstring
contentsstring

Returns

unit

WriteAllTextAsync

this.WriteAllTextAsync
Member
Asynchronously creates or overwrites a text file, writes all text, and then closes the file.

Parameters

NameTypeDescription
pathstring
contentsstring
cancellationTokenCancellationToken

Returns

Task