Class FileSystem
File system utilities.
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class FileSystem : DeputyBase
Syntax (vb)
Public Class FileSystem Inherits DeputyBase
Remarks
ExampleMetadata: fixture=_generated
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();
Synopsis
Constructors
| FileSystem() | File system utilities. |
Properties
| Tmpdir | The real path of the system temp directory. |
Methods
| CopyDirectory(string, string, ICopyOptions?, string?) | Copies an entire directory structure. |
| Fingerprint(string, IFingerprintOptions?) | Produces fingerprint based on the contents of a single file or an entire directory tree. |
| IsEmpty(string) | Checks whether a directory is empty. |
| Mkdtemp(string) | Creates a unique temporary directory in the system temp directory. |
| Rmrf(string) | Deletes a directory. |
Constructors
FileSystem()
File system utilities.
public FileSystem()
Remarks
ExampleMetadata: fixture=_generated
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();
Properties
Tmpdir
The real path of the system temp directory.
public static string Tmpdir { get; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
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.
Remarks
ExampleMetadata: fixture=_generated
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
Remarks
Line endings are converted from CRLF to LF.
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
Remarks
ExampleMetadata: fixture=_generated
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
Remarks
ExampleMetadata: fixture=_generated
Rmrf(string)
Deletes a directory.
public static void Rmrf(string dirname)
Parameters
- dirname string
Remarks
ExampleMetadata: fixture=_generated