Class CosmosVFS
Cosmos default virtual file system.
Inherited Members
Namespace: Cosmos.System.FileSystem
Assembly: Cosmos.System2.dll
Syntax
public class CosmosVFS : VFSBase
Methods
| Improve this Doc View SourceCreateDirectory(String)
Creates a directory.
Declaration
public override DirectoryEntry CreateDirectory(string aPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | aPath | The full path including the directory to create. |
Returns
Type | Description |
---|---|
DirectoryEntry | DirectoryEntry value. |
Overrides
| Improve this Doc View SourceCreateFile(String)
Creates a new file.
Declaration
public override DirectoryEntry CreateFile(string aPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | aPath | The full path including the file to create. |
Returns
Type | Description |
---|---|
DirectoryEntry | DirectoryEntry value. |
Overrides
| Improve this Doc View SourceDeleteDirectory(DirectoryEntry)
Deletes an empty directory.
Declaration
public override bool DeleteDirectory(DirectoryEntry aPath)
Parameters
Type | Name | Description |
---|---|---|
DirectoryEntry | aPath | The full path. |
Returns
Type | Description |
---|---|
System.Boolean | TRUE on success. |
Overrides
| Improve this Doc View SourceDeleteFile(DirectoryEntry)
Deletes a file.
Declaration
public override bool DeleteFile(DirectoryEntry aPath)
Parameters
Type | Name | Description |
---|---|---|
DirectoryEntry | aPath | The full path. |
Returns
Type | Description |
---|---|
System.Boolean | TRUE on success. |
Overrides
| Improve this Doc View SourceFormat(String, String, Boolean)
Format partition.
Declaration
public override void Format(string aDriveId, string aDriveFormat, bool aQuick)
Parameters
Type | Name | Description |
---|---|---|
System.String | aDriveId | A drive id. |
System.String | aDriveFormat | A drive format. |
System.Boolean | aQuick | Quick format. |
Overrides
| Improve this Doc View SourceGetAvailableFreeSpace(String)
Get available free space.
Declaration
public override long GetAvailableFreeSpace(string aDriveId)
Parameters
Type | Name | Description |
---|---|---|
System.String | aDriveId | A drive id to get the size of. |
Returns
Type | Description |
---|---|
System.Int64 | long value. |
Overrides
| Improve this Doc View SourceGetDirectory(String)
Gets the directory entry for a directory.
Declaration
public override DirectoryEntry GetDirectory(string aPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | aPath | The full path path. |
Returns
Type | Description |
---|---|
DirectoryEntry | A directory entry for the directory. |
Overrides
| Improve this Doc View SourceGetDirectoryListing(DirectoryEntry)
Gets the directory listing for a directory entry.
Declaration
public override List<DirectoryEntry> GetDirectoryListing(DirectoryEntry aDirectory)
Parameters
Type | Name | Description |
---|---|---|
DirectoryEntry | aDirectory | The directory entry. |
Returns
Type | Description |
---|---|
List<DirectoryEntry> | DirectoryEntry type list value. |
Overrides
| Improve this Doc View SourceGetDirectoryListing(String)
Gets the directory listing for a path.
Declaration
public override List<DirectoryEntry> GetDirectoryListing(string aPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | aPath | The full path. |
Returns
Type | Description |
---|---|
List<DirectoryEntry> | DirectoryEntry list value. |
Overrides
| Improve this Doc View SourceGetFile(String)
Gets the directory entry for a file.
Declaration
public override DirectoryEntry GetFile(string aPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | aPath | The full path. |
Returns
Type | Description |
---|---|
DirectoryEntry | A directory entry for the file. |
Overrides
| Improve this Doc View SourceGetFileAttributes(String)
Gets the attributes for a File / Directory.
Declaration
public override FileAttributes GetFileAttributes(string aPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | aPath | The path of the File / Directory. |
Returns
Type | Description |
---|---|
FileAttributes | The File / Directory attributes. |
Overrides
| Improve this Doc View SourceGetFileSystemLabel(String)
Get file system label.
Declaration
public override string GetFileSystemLabel(string aDriveId)
Parameters
Type | Name | Description |
---|---|---|
System.String | aDriveId | A drive id. |
Returns
Type | Description |
---|---|
System.String | string value. |
Overrides
| Improve this Doc View SourceGetFileSystemType(String)
Get file system type.
Declaration
public override string GetFileSystemType(string aDriveId)
Parameters
Type | Name | Description |
---|---|---|
System.String | aDriveId | A drive id. |
Returns
Type | Description |
---|---|
System.String | string value. |
Overrides
| Improve this Doc View SourceGetTotalFreeSpace(String)
Get total free space.
Declaration
public override long GetTotalFreeSpace(string aDriveId)
Parameters
Type | Name | Description |
---|---|---|
System.String | aDriveId | A drive id to get the size of. |
Returns
Type | Description |
---|---|
System.Int64 | long value. |
Overrides
| Improve this Doc View SourceGetTotalSize(String)
Get total size in bytes.
Declaration
public override long GetTotalSize(string aDriveId)
Parameters
Type | Name | Description |
---|---|---|
System.String | aDriveId | A drive id to get the size of. |
Returns
Type | Description |
---|---|
System.Int64 | long value. |
Overrides
| Improve this Doc View SourceGetVolume(String)
Gets the directory entry for a volume.
Declaration
public override DirectoryEntry GetVolume(string aPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | aPath | The volume root path. |
Returns
Type | Description |
---|---|
DirectoryEntry | A directory entry for the volume. |
Overrides
| Improve this Doc View SourceGetVolumes()
Gets the volumes for all registered file systems.
Declaration
public override List<DirectoryEntry> GetVolumes()
Returns
Type | Description |
---|---|
List<DirectoryEntry> | A list of directory entries for all volumes. |
Overrides
| Improve this Doc View SourceInitialize()
Initializes the virtual file system.
Declaration
public override void Initialize()
Overrides
| Improve this Doc View SourceInitializeFileSystems()
Initializes the file system for all partitions.
Declaration
protected virtual void InitializeFileSystems()
InitializePartitions()
Initializes the partitions for all block devices.
Declaration
protected virtual void InitializePartitions()
IsValidDriveId(String)
Verifies if driveId is a valid id for a drive.
Declaration
public override bool IsValidDriveId(string driveId)
Parameters
Type | Name | Description |
---|---|---|
System.String | driveId | The id of the drive. |
Returns
Type | Description |
---|---|
System.Boolean | true if the drive id is valid, false otherwise. |
Overrides
| Improve this Doc View SourceRegisterFileSystem(FileSystemFactory)
Register file system.
Declaration
public override void RegisterFileSystem(FileSystemFactory aFileSystemFactory)
Parameters
Type | Name | Description |
---|---|---|
FileSystemFactory | aFileSystemFactory | A file system to register. |
Overrides
| Improve this Doc View SourceSetFileAttributes(String, FileAttributes)
Sets the attributes for a File / Directory. Not implemented.
Declaration
public override void SetFileAttributes(string aPath, FileAttributes fileAttributes)
Parameters
Type | Name | Description |
---|---|---|
System.String | aPath | The path of the File / Directory. |
FileAttributes | fileAttributes | The attributes of the File / Directory. |
Overrides
| Improve this Doc View SourceSetFileSystemLabel(String, String)
Set file system type.
Declaration
public override void SetFileSystemLabel(string aDriveId, string aLabel)
Parameters
Type | Name | Description |
---|---|---|
System.String | aDriveId | A drive id. |
System.String | aLabel | A label to be set. |