File Operations aliases

Built-In

Contains functionality related to file operations.

General

File(string) Gets a file path from string.

Copy

CopyFile(FilePath, FilePath) Copies an existing file to a new file, providing the option to specify a new file name.
CopyFiles(GlobPattern, DirectoryPath, bool) Copies all files matching the provided pattern to a new location.
CopyFiles(GlobPattern, DirectoryPath) Copies all files matching the provided pattern to a new location.
CopyFiles(IEnumerable<FilePath>, DirectoryPath, bool) Copies existing files to a new location.
CopyFiles(IEnumerable<FilePath>, DirectoryPath) Copies existing files to a new location.
CopyFiles(IEnumerable<string>, DirectoryPath, bool) Copies existing files to a new location.
CopyFiles(IEnumerable<string>, DirectoryPath) Copies existing files to a new location.
CopyFileToDirectory(FilePath, DirectoryPath) Copies an existing file to a new location.

Delete

DeleteFile(FilePath) Deletes the specified file.
DeleteFiles(GlobPattern) Deletes the specified files.
DeleteFiles(IEnumerable<FilePath>) Deletes the specified files.

Exists

FileExists(FilePath) Determines whether the given path refers to an existing file.
FileSize(FilePath) Gets the size of a file in bytes.

Move

MoveFile(FilePath, FilePath) Moves an existing file to a new location, providing the option to specify a new file name.
MoveFiles(GlobPattern, DirectoryPath) Moves existing files matching the specified pattern to a new location.
MoveFiles(IEnumerable<FilePath>, DirectoryPath) Moves existing files to a new location.
MoveFileToDirectory(FilePath, DirectoryPath) Moves an existing file to a new location.

Path

ExpandEnvironmentVariables(FilePath) Expands all environment variables in the provided FilePath.
MakeAbsolute(FilePath) Makes the path absolute (if relative) using the current working directory.