Interface IAbsoluteFilePath
Represents an absolute path to a file.
Inherited Members
Namespace: Singulink.IO
Assembly: Singulink.IO.FileSystem.dll
Syntax
public interface IAbsoluteFilePath : IAbsolutePath, IFilePath, IPath, IEquatable<IPath?>
Properties
Name | Description |
---|---|
IsReadOnly | Gets or sets a value indicating whether the file is read-only. |
Length | Gets the size of the file in bytes. |
ParentDirectory | Gets the file's parent directory. |
Methods
Name | Description |
---|---|
CopyTo(IAbsoluteFilePath, bool) | Copies the file to a new file, optionally allowing the overwriting of an existing file. |
Delete() | Deletes the file. |
MoveTo(IAbsoluteFilePath, bool) | Moves the file to a new location, optionally allowing the overwriting of an existing file. Overwriting is only supported on .NET Core 3+ only, other runtimes (i.e. Mono/Xamarin) will throw NotSupportedException). |
OpenAsyncStream(FileMode, FileAccess, FileShare, int, FileOptions) | Opens an asynchronous file stream to a new or existing file (the Asynchronous option is always appended). |
OpenStream(FileMode, FileAccess, FileShare, int, FileOptions) | Opens a file stream to a new or existing file. |
OpenStreamAsync(FileMode, FileAccess, FileShare, int, FileOptions) | Opens an asynchronous file stream to a new or existing file (the Asynchronous option is always appended). |
Replace(IAbsoluteFilePath, IAbsoluteFilePath, bool) | Replaces the contents of a file with the current file, deleting the original file and creating a backup of the replaced file. |
WithExtension(string?, PathOptions) | Adds a new extension or changes the existing extension of the file. |
Explicit Interface Implementations
Name | Description |
---|---|
IFilePath.WithExtension(string?, PathOptions) | Adds a new extension or changes the existing extension of the file. |