Table of Contents

Class FileSystem

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Contains static methods which allow to work with the file system. All calls are translated to the Default file system.

public static class FileSystem
Inheritance
FileSystem

Fields

Default

Gets or sets default provider for the IFileSystem. All call to the static methods of the FileSystem are translated to this field.

Methods

Create(string)

Creates or overwrites a file in the specified path.

Create(string, int)

Creates or overwrites a file in the specified path, specifying a buffer size.

Create(string, int, FileOptions)

Creates or overwrites a file in the specified path, specifying a buffer size and options that describe how to create or overwrite the file.

DirectoryExists(string?)

Gets whether the given path refers to an existing directory.

FileExists(string?)

Gets whether the specified file exists.

GetDirectories(string?)

Gets the names of subdirectories (including their paths) in the specified directory.

GetFiles(string?, string?)

Gets the names of files (with their paths) that match the specified search pattern in the specified directory.

Open(string, FileMode)

Opens a Stream on the specified path with read/write access with no sharing.

Open(string, FileMode, FileAccess)

Opens a Stream on the specified path, with the specified mode and access with no sharing.

Open(string, FileMode, FileAccess, FileShare)

Opens a Stream on the specified path, having the specified mode with read, write, or read/write access and the specified sharing option.

OpenRead(string)

Opens an existing file for reading.