Table of Contents

Class FoundFileInfo

Namespace
ArcanaDevelopment.adTempus.Shared
Assembly
ArcanaDevelopment.adTempus.Shared.dll

Substitute for System.IO.FileInfo so that found file info can be serialized.

[Serializable]
[DataContract]
[InternalUse]
public class FoundFileInfo : IFoundFileInfo
Inheritance
object
FoundFileInfo
Implements

Constructors

FoundFileInfo()

public FoundFileInfo()

FoundFileInfo(FileInfo, FileTriggerOptions)

public FoundFileInfo(FileInfo source, FileTriggerOptions action = FileTriggerOptions.None)

Parameters

NameTypeDescription
source FileInfo
action FileTriggerOptions

FoundFileInfo(string, FileTriggerOptions)

public FoundFileInfo(string fileName, FileTriggerOptions action = FileTriggerOptions.None)

Parameters

NameTypeDescription
fileName string
action FileTriggerOptions

Properties

Attributes

The file attributes of the file.

[DataMember]
public FileAttributes Attributes { get; set; }

Property Value

FileAttributes

CreationTime

The time the file was created

public DateTimeOffset CreationTime { get; set; }

Property Value

DateTimeOffset

CreationTimeUtc

The time the file was created

[DataMember]
public DateTime CreationTimeUtc { get; set; }

Property Value

DateTime

DirectoryName

The full name of the directory in which the file is located.

public string DirectoryName { get; }

Property Value

string

FileAction

The state of this file. Set only for file triggers.

[DataMember]
public FileTriggerOptions FileAction { get; set; }

Property Value

FileTriggerOptions

FullName

The full name of the file, including the path

[DataMember]
public string FullName { get; set; }

Property Value

string

Remarks

This property converts all backslashes in the path and name to forward slashes

LastAccessTime

The time the file was last accessed

public DateTimeOffset LastAccessTime { get; set; }

Property Value

DateTimeOffset

LastAccessTimeUtc

The time the file was last accessed

[DataMember]
public DateTime LastAccessTimeUtc { get; set; }

Property Value

DateTime

LastWriteTime

The time the file was last modified

public DateTimeOffset LastWriteTime { get; set; }

Property Value

DateTimeOffset

LastWriteTimeUtc

The time the file was last modified

[DataMember]
public DateTime LastWriteTimeUtc { get; set; }

Property Value

DateTime

Length

The size of the file, in bytes

[DataMember]
public long Length { get; set; }

Property Value

long

Name

The name of the file (without the path)

public string Name { get; }

Property Value

string

OriginalName

The original name of the file

[DataMember]
public string OriginalName { get; set; }

Property Value

string

OriginalOrCurrentName

Gets the Original name if set, or the FullName otherwise.

public string OriginalOrCurrentName { get; }

Property Value

string

Methods

CompareTo(FoundFileInfo)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(FoundFileInfo other)

Parameters

NameTypeDescription
other FoundFileInfo

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value

Meaning

Less than zero

This instance precedes other in the sort order.

Zero

This instance occurs in the same position in the sort order as other.

Greater than zero

This instance follows other in the sort order.

CompareTo(object)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(object obj)

Parameters

NameTypeDescription
obj object

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value

Meaning

Less than zero

This instance precedes obj in the sort order.

Zero

This instance occurs in the same position in the sort order as obj.

Greater than zero

This instance follows obj in the sort order.

Exceptions

ArgumentException

obj is not the same type as this instance.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

NameTypeDescription
obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.