FileIdentifier Struct

Represents a unique file or directory identifier on an NTFS volume.

public readonly struct FileIdentifier : IEquatable<FileIdentifier>
Implements

Constructors

NameDescription
FileIdentifier(UInt128)
FileIdentifier(ulong)

FileIdentifier overloads

FileIdentifier(UInt128)

FileIdentifier.cs
public FileIdentifier(UInt128 value)
Parameters
value UInt128

No documentation is available.

FileIdentifier(ulong)

FileIdentifier.cs
public FileIdentifier(ulong value)
Parameters
value ulong

No documentation is available.

Methods

NameDescription
Equals(FileIdentifier)
Equals(object?)
FromFile(SafeFileHandle)Gets the file identifier for the specified file or directory handle.
FromFile(string)Gets the file identifier for the specified file or directory path.
GetHashCode()
ToString()

Equals overloads

Equals(FileIdentifier)

FileIdentifier.cs
public bool Equals(FileIdentifier other)
Parameters
other FileIdentifier
Returns

bool

No documentation is available.

Equals(object?)

FileIdentifier.cs
public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

FromFile overloads

FromFile(SafeFileHandle)

FileIdentifier.cs
  • Supported on windows6.0.6000

Gets the file identifier for the specified file or directory handle.

[SupportedOSPlatform("windows6.0.6000")]
public static FileIdentifier FromFile(SafeFileHandle handle)
Parameters
handle SafeFileHandle
A handle to the file or directory.
Returns

FileIdentifier The file identifier for the specified file or directory.

Exceptions
Win32Exception
Thrown when the operation fails.

FromFile(string)

FileIdentifier.cs
  • Supported on windows6.0.6000

Gets the file identifier for the specified file or directory path.

[SupportedOSPlatform("windows6.0.6000")]
public static FileIdentifier FromFile(string path)
Parameters
path string
The path to the file or directory.
Returns

FileIdentifier The file identifier for the specified file or directory.

Exceptions
ArgumentNullException
Thrown when path is null.
Win32Exception
Thrown when the operation fails.

GetHashCode()

FileIdentifier.cs
public override int GetHashCode()

Returns

int

No documentation is available.

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(FileIdentifier, FileIdentifier)
operator !=(FileIdentifier, FileIdentifier)

operator ==(FileIdentifier, FileIdentifier)

FileIdentifier.cs
public static bool operator ==(FileIdentifier left, FileIdentifier right)

Parameters

left FileIdentifier
right FileIdentifier

Returns

bool

No documentation is available.

operator !=(FileIdentifier, FileIdentifier)

FileIdentifier.cs
public static bool operator !=(FileIdentifier left, FileIdentifier right)

Parameters

left FileIdentifier
right FileIdentifier

Returns

bool

No documentation is available.