Table of Contents

Struct PathInfo

Namespace
Sdl3Sharp.IO
Assembly
Sdl3Sharp.dll

Represents information about a file system entry

public readonly struct PathInfo : ISpanFormattable, IFormattable
Implements
Inherited Members

Properties

AccessTime

Gets the last time the file system entry was read

public Time AccessTime { get; }

Property Value

Time

The last time the file system entry was read

CreationTime

Gets the time the file system entry was created

public Time CreationTime { get; }

Property Value

Time

The time the file system entry was created

Length

Gets the size, in bytes, of file system entries that are files

public ulong Length { get; }

Property Value

ulong

The size, in bytes, of file system entries that are files, or 0

ModificationTime

Gets the last time the file system entry was modified

public Time ModificationTime { get; }

Property Value

Time

The last time the file system entry was modified

Type

Gets the type of the file system entry

public PathType Type { get; }

Property Value

PathType

The type of the file system entry

Methods

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

ToString(IFormatProvider?)

Formats the value of the current instance using the specified format.

public string ToString(IFormatProvider? formatProvider)

Parameters

formatProvider IFormatProvider

The provider to use to format the value.

-or-

A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.

Returns

string

The value of the current instance in the specified format.

ToString(string?)

Formats the value of the current instance using the specified format.

public string ToString(string? format)

Parameters

format string

The format to use.

-or-

A null reference (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.

Returns

string

The value of the current instance in the specified format.

ToString(string?, IFormatProvider?)

Formats the value of the current instance using the specified format.

public string ToString(string? format, IFormatProvider? formatProvider)

Parameters

format string

The format to use.

-or-

A null reference (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.

formatProvider IFormatProvider

The provider to use to format the value.

-or-

A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.

Returns

string

The value of the current instance in the specified format.

TryFormat(Span<char>, out int, ReadOnlySpan<char>, IFormatProvider?)

Tries to format the value of the current instance into the provided span of characters.

public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format = default, IFormatProvider? provider = null)

Parameters

destination Span<char>

The span in which to write this instance's value formatted as a span of characters.

charsWritten int

When this method returns, contains the number of characters that were written in destination.

format ReadOnlySpan<char>

A span containing the characters that represent a standard or custom format string that defines the acceptable format for destination.

provider IFormatProvider

An optional object that supplies culture-specific formatting information for destination.

Returns

bool

true if the formatting was successful; otherwise, false.