Class FileSystem
File system utilities.
public class FileSystem : DeputyBase
- Inheritance
-
FileSystem
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var fileSystem = new FileSystem();
Remarks
ExampleMetadata: fixture=_generated
Constructors
FileSystem()
public FileSystem()
Properties
Tmpdir
The real path of the system temp directory.
public static string Tmpdir { get; }
Property Value
Methods
CopyDirectory(string, string, ICopyOptions?, string?)
Copies an entire directory structure.
public static void CopyDirectory(string srcDir, string destDir, ICopyOptions? options = null, string? rootDir = null)
Parameters
srcDir
stringSource directory.
destDir
stringDestination directory.
options
ICopyOptionsoptions.
rootDir
stringRoot directory to calculate exclusions from.
Fingerprint(string, IFingerprintOptions?)
Produces fingerprint based on the contents of a single file or an entire directory tree.
public static string Fingerprint(string fileOrDirectory, IFingerprintOptions? options = null)
Parameters
fileOrDirectory
stringThe directory or file to fingerprint.
options
IFingerprintOptionsFingerprinting options.
Returns
Remarks
The fingerprint will also include:
IsEmpty(string)
Checks whether a directory is empty.
public static bool IsEmpty(string dir)
Parameters
dir
stringThe directory to check.
Returns
Mkdtemp(string)
Creates a unique temporary directory in the system temp directory.
public static string Mkdtemp(string prefix)
Parameters
prefix
stringA prefix for the directory name.