FileOp

Description

struct Tinman.Core.IO.Files.FileOp

Derived from

IEquatable<FileOp>

Describes a file operation.

The Source and Target paths may refer to a file (no trailing separator) or a directory (with a trailing separator). If absolute, the path will be in its canonical form.

Public / Constants

None


public static readonly attribute None → (FileOp)

The FileOp value with Action being 0.

Public / Constructors

File​Op


public constructor FileOp → (3)

source in : Path

See Source.

target in : Path

See Target.

move opt : bool = false

If both source in and target in refer to a file or directory, specifies whether the source is renamed / moved to the target (true) or the source is copied to the target (false).

Creates a new instance of FileOp.

Public / Attributes

Action


[Constant]
public attribute Action → (get)

value : int32

The file action:
-2 : Source is deleted
-1 : Source is renamed/moved to Target
0 : no file action is performed
+1 : Source is copied to Target
+2 : Target is created or generated.

Returns the file action.

Source


public readonly attribute Source → (Path)

Path to the source file or directory.

Will be null iff Action is 0 or +2. Will never be Path.Unknown.

Target


public readonly attribute Target → (Path)

Path to the target file or directory.

Will be null iff Action is 0 or -2. Will never be Path.Unknown.