Table of Contents

Class FileSystem

Namespace
Amazon.CDK
Assembly
Amazon.CDK.dll

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

string

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 string

Source directory.

destDir string

Destination directory.

options ICopyOptions

options.

rootDir string

Root 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 string

The directory or file to fingerprint.

options IFingerprintOptions

Fingerprinting options.

Returns

string

Remarks

The fingerprint will also include:

    IsEmpty(string)

    Checks whether a directory is empty.

    public static bool IsEmpty(string dir)

    Parameters

    dir string

    The directory to check.

    Returns

    bool

    Mkdtemp(string)

    Creates a unique temporary directory in the system temp directory.

    public static string Mkdtemp(string prefix)

    Parameters

    prefix string

    A prefix for the directory name.

    Returns

    string