• Home
  • Install
  • Cosmos Website
  • Articles
  • Cosmos
  • X#
  • IL2CPU
Show / Hide Table of Contents
  • Cosmos.Core
    • ACPI
    • ACPI.RSDPtr
    • Bootstrap
    • CPU
    • GCImplementation
    • GCTable
    • Global
    • INTs
    • INTs.EFlagsEnum
    • INTs.ExceptionInterruptDelegate
    • INTs.IRQContext
    • INTs.IRQDelegate
    • INTs.MMXContext
    • INTs.TSS
    • IOPort
    • KernelPanics
    • ManagedMemoryBlock
    • MemoryBlock
    • MemoryBlock08
    • MemoryBlock16
    • MemoryBlock32
    • MemoryMapBlock
    • MemoryOperations
    • PIC
    • PIC.Cmd
    • RawMemoryMapBlock
    • VTable
    • VTablesImpl
  • Cosmos.Core.IOGroup
    • ATA
    • PIC
    • PS2Controller
  • Cosmos.Core.Memory
    • Heap
    • HeapLarge
    • HeapMedium
    • HeapSmall
    • ObjectGCStatus
    • RAT
    • RAT.PageType
    • RootSMTBlock
    • SMTBlock
    • SMTPage
  • Cosmos.Core.MemoryGroup
    • AHCI
  • Cosmos.Core.Multiboot
    • Multiboot2
  • Cosmos.Core.Multiboot.Tags
    • AcpiNew
    • AcpiOld
    • BasicMemoryInformation
    • EFI64
    • Framebuffer
    • MB2Tag
    • MemoryMap
  • Cosmos.Core_Asm
    • ArrayClearAsm
    • ArrayGetLengthAsm
    • ArrayImpl
    • ArrayInternalCopyAsm
    • BufferBlockCopyAsm
    • BufferImpl
    • CPUCanReadCPUIDAsm
    • CPUDisableINTsAsm
    • CPUEnableINTsAsm
    • CPUGetEBPValue
    • CPUGetEndOfKernelAsm
    • CPUGetESPValue
    • CPUGetStackStart
    • CPUHaltAsm
    • CPUImpl
    • CPUInitFloatAsm
    • CPUInitSSEAsm
    • CPUReadCPUIDAsm
    • CPUReadModelSpecificRegisterAsm
    • CPUReadTimestampCounterAsm
    • CPUSetESPValue
    • CPUUpdateIDTAsm
    • CPUZeroFillAsm
    • DelegateCtorAsm
    • DelegateGetMulticastInvokeAsm
    • DelegateImpl
    • DelegateInvokeAsm
    • GCImplementationImpl
    • IOPortImpl
    • Multiboot2Impl
    • Multiboot2ImplAsm
    • RuntimeHelpersImpl
  • Cosmos.Core_Asm.MemoryOperations
    • MemoryOperationsCopy128BlocksAsm
    • MemoryOperationsCopy128BytesAsm
    • MemoryOperationsCopy16BytesAsm
    • MemoryOperationsCopy32BytesAsm
    • MemoryOperationsCopy64BytesAsm
    • MemoryOperationsFill16BlocksAsm
  • Cosmos.Debug.Kernel
    • Debugger
    • DebuggerFactory
  • Cosmos.HAL
    • BaudRate
    • Bootstrap
    • CardType
    • ClassID
    • COMPort
    • DataReceivedHandler
    • Device
    • DeviceID
    • Global
    • KeyboardBase
    • KeyboardBase.KeyPressedEventHandler
    • MouseBase
    • MouseBase.MouseChangedEventHandler
    • NetworkDevice
    • PCI
    • PCIBaseAddressBar
    • PCIDevice
    • PCIDevice.Config
    • PCIDevice.DeviceClass
    • PCIDevice.PCIBist
    • PCIDevice.PCICommand
    • PCIDevice.PCIHeaderType
    • PCIDevice.PCIInterruptPIN
    • PCIDeviceBridge
    • PCIDeviceCardbus
    • PCIDeviceNormal
    • PCSpeaker
    • PIT
    • PIT.PITTimer
    • PIT.PITTimer.OnTrigger
    • Power
    • ProgramIF
    • PS2Controller
    • PS2Keyboard
    • PS2Mouse
    • RTC
    • SerialPort
    • SpeakerExtensions
    • SubclassID
    • TextScreen
    • TextScreenBase
    • TextScreenHelpers
    • VendorID
  • Cosmos.HAL.Audio
    • AudioBitDepth
    • AudioBuffer
    • IAudioBufferProvider
    • SampleFormat
  • Cosmos.HAL.BlockDevice
    • AHCI
    • Ata
    • Ata.BusPositionEnum
    • Ata.ControllerIdEnum
    • ATA_PIO
    • ATA_PIO.Cmd
    • ATA_PIO.DvcSelVal
    • ATA_PIO.Ident
    • ATA_PIO.SpecLevel
    • ATA_PIO.Status
    • ATAPI
    • ATAPI.PacketCommands
    • BlockDevice
    • BlockDeviceType
    • EBR
    • EBR.PartInfo
    • GPT
    • GPT.GPartInfo
    • IDE
    • MBR
    • MBR.PartInfo
    • Partition
  • Cosmos.HAL.BlockDevice.Ports
    • SATA
    • SATAPI
    • StoragePort
  • Cosmos.HAL.BlockDevice.Registers
    • AHCISignature
    • ATACommands
    • ATADeviceStatus
    • Base
    • Bases
    • CommandAndStatus
    • CurrentInterfaceSpeedStatus
    • DeviceDetectionStatus
    • FISRegisterD2H
    • FISRegisterH2D
    • FISSize
    • FISType
    • GenericRegisters
    • HBACommandHeader
    • HBACommandTable
    • HBAPRDTEntry
    • InterfacePowerManagementStatus
    • InterruptEnable
    • InterruptStatus
    • PortRegisters
    • PortType
  • Cosmos.HAL.Drivers.Audio
    • AC97
    • AudioDriver
  • Cosmos.HAL.Drivers.Network
    • AMDPCNetII
    • E1000
    • E1000.RXDesc
    • E1000.TXDesc
    • E1000DeviceID
    • RTL8139
  • Cosmos.HAL.Drivers.USB
    • USBHost
  • Cosmos.HAL.Drivers.Video
    • VBEDriver
    • VGADriver
    • VGADriver.ColorDepth
    • VGADriver.ScreenSize
    • VGADriver.TextSize
  • Cosmos.HAL.Drivers.Video.SVGAII
    • Capability
    • FIFO
    • FIFOCommand
    • ID
    • IOPortOffset
    • Register
    • VMWareSVGAII
  • Cosmos.HAL.Network
    • MACAddress
    • NetworkInit
  • Cosmos.System
    • Console
    • ConsoleKeyEx
    • ConsoleKeyExExtensions
    • Durations
    • Global
    • Kernel
    • KeyboardManager
    • KeyEvent
    • KeyEvent.KeyEventType
    • KeyMapping
    • MouseManager
    • MouseState
    • Notes
    • PCSExtensions
    • PCSpeaker
    • Power
    • ScanMapBase
    • VMTools
  • Cosmos.System.Audio
    • AudioManager
    • AudioMixer
    • AudioStream
  • Cosmos.System.Audio.DSP.Processing
    • AudioPostProcessor
    • GainPostProcessor
  • Cosmos.System.Audio.IO
    • AudioBufferReader
    • AudioBufferReadWriteBase
    • AudioBufferWriter
    • MemoryAudioStream
    • SeekableAudioStream
  • Cosmos.System.ExtendedASCII
    • CosmosEncodingProvider
  • Cosmos.System.FileSystem
    • CosmosVFS
    • Disk
    • FileSystem
    • FileSystemFactory
    • ManagedPartition
  • Cosmos.System.FileSystem.FAT
    • FatFileSystemFactory
  • Cosmos.System.FileSystem.FAT.Listing
    • FatDirectoryEntryAttributeConsts
    • FatDirectoryEntryMetadata
    • FatDirectoryEntryMetadata.LongFilenameEntryMetadata
  • Cosmos.System.FileSystem.ISO9660
    • ISO9660FileSystem
    • ISO9660FileSystemFactory
  • Cosmos.System.FileSystem.Listing
    • DirectoryEntry
    • DirectoryEntryTypeEnum
  • Cosmos.System.FileSystem.VFS
    • FileSystemManager
    • VFSBase
    • VFSManager
  • Cosmos.System.Graphics
    • Bitmap
    • Canvas
    • ColorDepth
    • ColorOrder
    • FullScreenCanvas
    • Image
    • ImageFormat
    • Mode
    • SVGAIICanvas
    • VBECanvas
    • VGACanvas
    • VGAScreen
  • Cosmos.System.Graphics.Fonts
    • Font
    • PCScreenFont
    • UnicodeMapping
  • Cosmos.System.Helpers
    • ArrayHelper
  • Cosmos.System.IO
    • ConsoleStream
    • SyncTextReader
  • Cosmos.System.Keyboard
    • KeyEventHelper
  • Cosmos.System.Network
    • EthernetPacket
    • NetworkDebugger
    • NetworkStack
  • Cosmos.System.Network.ARP
    • ARPPacket
  • Cosmos.System.Network.Config
    • DNSConfig
    • IPConfig
    • NetworkConfig
    • NetworkConfiguration
  • Cosmos.System.Network.IPv4
    • Address
    • EndPoint
    • ICMPClient
    • ICMPPacket
    • IPPacket
    • OutgoingBuffer
  • Cosmos.System.Network.IPv4.TCP
    • Flags
    • Status
    • Tcp
    • TCPOption
    • TCPPacket
    • TransmissionControlBlock
  • Cosmos.System.Network.IPv4.UDP
    • UdpClient
    • UDPPacket
  • Cosmos.System.Network.IPv4.UDP.DHCP
    • DHCPClient
    • DHCPOption
    • DHCPPacket
  • Cosmos.System.Network.IPv4.UDP.DNS
    • DNSAnswer
    • DnsClient
    • DNSPacket
    • DNSPacketAnswer
    • DNSPacketAsk
    • DNSQuery
    • ReplyCode
  • Cosmos.System.ScanMaps
    • DEStandardLayout
    • ESStandardLayout
    • FRStandardLayout
    • GBStandardLayout
    • TRStandardLayout
    • US_Dvorak
    • USStandardLayout

Class VFSManager

VFSManager (Virtual File System Manager) class. Used to manage files and directories.

Inheritance
System.Object
VFSManager
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Cosmos.System.FileSystem.VFS
Assembly: Cosmos.System2.dll
Syntax
public static class VFSManager

Methods

| Improve this Doc View Source

CreateDirectory(String)

Create directory.

Declaration
public static DirectoryEntry CreateDirectory(string aPath)
Parameters
Type Name Description
System.String aPath

A path to the directory.

Returns
Type Description
DirectoryEntry

DirectoryEntry value.

Exceptions
Type Condition
System.ArgumentNullException
  • Thrown if aPath is null / empty / invalid.
  • memory error.
System.ArgumentOutOfRangeException

Thrown on memory error / unknown directory entry type.

System.OverflowException

Thrown when data lenght is greater then Int32.MaxValue.

System.Exception
  • Thrown when data size invalid.
  • invalid directory entry type.
  • the entry at aPath is not a directory.
  • memory error.
System.ArgumentException
  • Thrown if aPath length is zero.
  • Thrown if aPath is invalid.
  • memory error.
System.RankException

Thrown on fatal error.

System.ArrayTypeMismatchException

Thrown on fatal error.

System.InvalidCastException

Thrown on memory error.

System.IO.PathTooLongException

Thrown when The aPath is longer than the system defined maximum length.

| Improve this Doc View Source

CreateFile(String)

Create a file.

Declaration
public static DirectoryEntry CreateFile(string aPath)
Parameters
Type Name Description
System.String aPath

A path to the file.

Returns
Type Description
DirectoryEntry

DirectoryEntry value.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if aPath is null.

System.ArgumentException

Thrown if aPath is empty or contains invalid chars.

System.Exception
  • Thrown when the entry at aPath is not a file.
  • Thrown when the parent directory of aPath is not a directory.
System.IO.PathTooLongException

Thrown when aPath is longer than the system defined max lenght.

| Improve this Doc View Source

DeleteDirectory(String, Boolean)

Delete directory.

Declaration
public static void DeleteDirectory(string aPath, bool recursive)
Parameters
Type Name Description
System.String aPath

A path to the directory.

System.Boolean recursive

Recursive delete (not empty directory).

Exceptions
Type Condition
System.ArgumentException
  • Thrown if aPath is null or empty.
  • Memory error.
  • Fatal error.
System.ArgumentNullException
  • Thrown if VFSManager is null.
  • Root directory is null.
  • Memory error.
System.ArgumentOutOfRangeException
  • Thrown when root directory address is smaller then root directory address.
  • Memory error.
System.OverflowException
  • Thrown when aPath is too deep.
  • Data lenght is greater then Int32.MaxValue.
System.Exception
  • Thrown if VFSManager is null.
  • Thrown when unable to determine filesystem for path: + aPath.
  • data size invalid.
  • invalid directory entry type.
  • path not found.
System.IO.IOException

Thrown if specified path isn't a directory / trying to delete not empty directory not recursivly / directory contains a corrupted file.

System.UnauthorizedAccessException

Thrown when trying to delete unknown type entry.

| Improve this Doc View Source

DeleteFile(String)

Delete a file.

Declaration
public static void DeleteFile(string aPath)
Parameters
Type Name Description
System.String aPath

A path to the file.

Exceptions
Type Condition
System.Exception
  • Thrown if VFS manager is null.
  • The entry at aPath is not a file.
System.UnauthorizedAccessException

Thrown when the specified path isn't a file

| Improve this Doc View Source

DirectoryExists(DirectoryEntry)

Check if directory exists.

Declaration
public static bool DirectoryExists(DirectoryEntry aEntry)
Parameters
Type Name Description
DirectoryEntry aEntry

A entry of the directory.

Returns
Type Description
System.Boolean

bool value.

Exceptions
Type Condition
System.ArgumentNullException

Thrown when aEntry is null.

| Improve this Doc View Source

DirectoryExists(String)

Check if directory exists.

Declaration
public static bool DirectoryExists(string aPath)
Parameters
Type Name Description
System.String aPath

A path to the directory.

Returns
Type Description
System.Boolean

bool value.

Exceptions
Type Condition
System.ArgumentException

Thrown when aPath is null or empty.

| Improve this Doc View Source

FileExists(DirectoryEntry)

Check if file exists.

Declaration
public static bool FileExists(DirectoryEntry aEntry)
Parameters
Type Name Description
DirectoryEntry aEntry

A entry of the file.

Returns
Type Description
System.Boolean

bool value.

| Improve this Doc View Source

FileExists(String)

Check if file exists.

Declaration
public static bool FileExists(string aPath)
Parameters
Type Name Description
System.String aPath

A path to the file.

Returns
Type Description
System.Boolean

bool value.

| Improve this Doc View Source

GetAltDirectorySeparatorChar()

Get alt. directory separator char.

Declaration
public static char GetAltDirectorySeparatorChar()
Returns
Type Description
System.Char

char value.

| Improve this Doc View Source

GetAvailableFreeSpace(String)

Get available free space.

Declaration
public static 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.

Exceptions
Type Condition
System.ArgumentException

Thrown when aDriveId is null or empty.

System.Exception

Unable to determine filesystem for path: + aDriveId

| Improve this Doc View Source

GetDirectory(String)

Get directory.

Declaration
public static DirectoryEntry GetDirectory(string aPath)
Parameters
Type Name Description
System.String aPath

A path to the directory.

Returns
Type Description
DirectoryEntry

DirectoryEntry value.

Exceptions
Type Condition
System.ArgumentException
  • Thrown if aPath is null or empty.
  • Root path is null or empty.
  • Memory error.
  • Fatal error.
System.ArgumentNullException
  • Thrown if VFSManager is null.
  • Thrown if aPath is null.
  • Root directory is null.
  • Memory error.
System.ArgumentOutOfRangeException
  • Thrown when root directory address is smaller then root directory address.
  • Memory error.
System.OverflowException
  • Thrown when aPath is too deep.
  • Data lenght is greater then Int32.MaxValue.
System.Exception
  • Thrown when unable to determine filesystem for path: + aPath.
  • data size invalid.
  • invalid directory entry type.
  • path not found.
| Improve this Doc View Source

GetDirectoryListing(String)

Get directory listing.

Declaration
public static List<DirectoryEntry> GetDirectoryListing(string aPath)
Parameters
Type Name Description
System.String aPath

A path to the entry.

Returns
Type Description
System.Collections.Generic.List<DirectoryEntry>

DirectoryEntry list value.

Exceptions
Type Condition
System.ArgumentException
  • Thrown if aPath is null or empty.
  • Root path is null or empty.
  • Memory error.
  • Fatal error.
System.ArgumentNullException
  • Thrown if aPath is null or empty.
  • Filesystem is null.
  • Root directory is null.
  • Memory error.
System.ArgumentOutOfRangeException
  • Thrown when root directory address is smaller then root directory address.
  • Memory error.
System.OverflowException
  • Thrown when aPath is too deep.
  • Data lenght is greater then Int32.MaxValue.
System.Exception
  • Thrown when unable to determine filesystem for path: + aPath.
  • data size invalid.
  • invalid directory entry type.
  • path not found.
| Improve this Doc View Source

GetDirectorySeparatorChar()

Get directory separator char.

Declaration
public static char GetDirectorySeparatorChar()
Returns
Type Description
System.Char

char value.

| Improve this Doc View Source

GetDisks()

Gets all of the disks

Declaration
public static List<Disk> GetDisks()
Returns
Type Description
System.Collections.Generic.List<Disk>

All of the disks on the system

| Improve this Doc View Source

GetFile(String)

Get file.

Declaration
public static DirectoryEntry GetFile(string aPath)
Parameters
Type Name Description
System.String aPath

A path to the file.

Returns
Type Description
DirectoryEntry

DirectoryEntry value.

Exceptions
Type Condition
System.ArgumentException
  • Thrown if aPath is null / empty / invalid.
  • Root path is null or empty.
  • Memory error.
  • Fatal error.
System.ArgumentNullException
  • Thrown if aPath is null or empty.
  • Filesystem is null.
  • Root directory is null.
  • Memory error.
System.ArgumentOutOfRangeException
  • Thrown when root directory address is smaller then root directory address.
  • Memory error.
System.OverflowException
  • Thrown when aPath is too deep.
  • Data lenght is greater then Int32.MaxValue.
System.Exception
  • Thrown when unable to determine filesystem for path: + aPath.
  • data size invalid.
  • invalid directory entry type.
  • path not found.
| Improve this Doc View Source

GetFileAttributes(String)

Get file attributes.

Declaration
public static FileAttributes GetFileAttributes(string aPath)
Parameters
Type Name Description
System.String aPath

A path to the file

Returns
Type Description
System.IO.FileAttributes

FileAttributes value.

Exceptions
Type Condition
System.ArgumentException
  • Thrown if aPath is null or empty.
  • Thrown when aFS root path is null or empty.
  • Thrown on memory error.
  • Fatal error.
System.ArgumentNullException
  • Thrown if VFSManager is null.
  • Thrown when root directory is null.
  • Thrown on memory error.
System.ArgumentOutOfRangeException
  • Thrown when root directory address is smaller then root directory address.
  • Thrown on memory error.
System.OverflowException
  • Thrown when aPath is too deep.
  • Thrown when data lenght is greater then Int32.MaxValue.
System.Exception
  • Thrown when data size invalid.
  • Thrown on invalid directory entry type.
  • Thrown when aPath entry not found.
  • Thrown when unable to determine filesystem for path: + aPath.
  • Thrown aPath is neither a file neither a directory.
| Improve this Doc View Source

GetFileStream(String)

Get file stream.

Declaration
public static Stream GetFileStream(string aPathname)
Parameters
Type Name Description
System.String aPathname

A path to the file.

Returns
Type Description
System.IO.Stream

Stream value.

Exceptions
Type Condition
System.ArgumentException
  • Thrown if aPathname is null / empty / invalid.
  • Root path is null or empty.
  • Memory error.
  • Fatal error.
System.ArgumentNullException
  • Thrown if aPathname is null or empty.
  • Filesystem is null.
  • Root directory is null.
  • Memory error.
System.ArgumentOutOfRangeException
  • Thrown when root directory address is smaller then root directory address.
  • Memory error.
System.OverflowException
  • Thrown when aPathname is too deep.
  • Data lenght is greater then Int32.MaxValue.
  • The number of clusters in the FAT entry is greater than Int32.MaxValue.
System.Exception
  • Thrown when unable to determine filesystem for path: + aPathname.
  • data size invalid.
  • invalid directory entry type.
  • path not found.
  • FAT table not found.
  • memory error.
| Improve this Doc View Source

GetFileSystemLabel(String)

Get file system label.

Declaration
public static string GetFileSystemLabel(string aDriveId)
Parameters
Type Name Description
System.String aDriveId

A drive id.

Returns
Type Description
System.String

string value.

Exceptions
Type Condition
System.ArgumentException

Thrown when aDriveId is null or empty.

System.Exception

Unable to determine filesystem for path: + aDriveId

| Improve this Doc View Source

GetFileSystemType(String)

Get file system type.

Declaration
public static string GetFileSystemType(string aDriveId)
Parameters
Type Name Description
System.String aDriveId

A drive id.

Returns
Type Description
System.String

string value.

Exceptions
Type Condition
System.ArgumentException

Thrown when aDriveId is null or empty.

System.Exception

Unable to determine filesystem for path: + aDriveId

| Improve this Doc View Source

GetFullPath(DirectoryEntry)

Get full path to the entry.

Declaration
public static string GetFullPath(DirectoryEntry aEntry)
Parameters
Type Name Description
DirectoryEntry aEntry

A entry.

Returns
Type Description
System.String

string value.

Exceptions
Type Condition
System.ArgumentNullException

Thrown when aEntry is null.

| Improve this Doc View Source

GetInvalidFileNameChars()

Get invalid filename chars.

Declaration
public static char[] GetInvalidFileNameChars()
Returns
Type Description
System.Char[]

char array value.

| Improve this Doc View Source

GetInvalidPathCharsWithAdditionalChecks()

Get invalid path chars with additional checks.

Declaration
public static char[] GetInvalidPathCharsWithAdditionalChecks()
Returns
Type Description
System.Char[]

char array value.

| Improve this Doc View Source

GetLogicalDrives()

Get logical drivers list.

Declaration
public static List<string> GetLogicalDrives()
Returns
Type Description
System.Collections.Generic.List<System.String>

List of strings value.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if filesystem is null.

System.ArgumentOutOfRangeException

Thrown when root directory address is smaller then root directory address.

System.ArgumentException

Thrown when root path is null or empty.

| Improve this Doc View Source

GetMaxPath()

Get max path.

Declaration
public static int GetMaxPath()
Returns
Type Description
System.Int32

int value.

| Improve this Doc View Source

GetNextFilesystemLetter()

Gets the next file system letter. For internal cosmos use only.

Declaration
public static string GetNextFilesystemLetter()
Returns
Type Description
System.String

Next file system letter

| Improve this Doc View Source

GetParent(String)

Gets the parent directory entry from the path.

Declaration
public static DirectoryEntry GetParent(string aPath)
Parameters
Type Name Description
System.String aPath

The full path to the current directory entry.

Returns
Type Description
DirectoryEntry

The parent directory entry.

Exceptions
Type Condition
System.ArgumentException
  • Thrown if aPath is null / empty / invalid.
  • Root path is null or empty.
  • Memory error.
  • Fatal error.
System.ArgumentNullException
  • Thrown if VFSManager is null.
  • Thrown if aPath is null.
  • Root directory is null.
  • Memory error.
System.ArgumentOutOfRangeException
  • Thrown when root directory address is smaller then root directory address.
  • Memory error.
  • Fatal error.
System.OverflowException
  • Thrown when aPath is too deep.
  • Data lenght is greater then Int32.MaxValue.
System.Exception
  • Thrown when unable to determine filesystem for path: + aPath.
  • data size invalid.
  • invalid directory entry type.
  • path not found.
| Improve this Doc View Source

GetPathSeparator()

Get path separator char.

Declaration
public static char GetPathSeparator()
Returns
Type Description
System.Char

char value.

| Improve this Doc View Source

GetRealInvalidPathChars()

Get real invalid path chars.

Declaration
public static char[] GetRealInvalidPathChars()
Returns
Type Description
System.Char[]

char array value.

| Improve this Doc View Source

GetTotalFreeSpace(String)

Get total free space.

Declaration
public static 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.

Exceptions
Type Condition
System.ArgumentException

Thrown when aDriveId is null or empty.

System.Exception

Unable to determine filesystem for path: + aDriveId

| Improve this Doc View Source

GetTotalSize(String)

Get total size in bytes.

Declaration
public static 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.

Exceptions
Type Condition
System.ArgumentException

Thrown when aDriveId is null or empty.

System.Exception

Unable to determine filesystem for path: + aDriveId

| Improve this Doc View Source

GetTrimEndChars()

Get trim end chars.

Declaration
public static char[] GetTrimEndChars()
Returns
Type Description
System.Char[]

char array value.

| Improve this Doc View Source

GetVolume(String)

Get volume.

Declaration
public static DirectoryEntry GetVolume(string aVolume)
Parameters
Type Name Description
System.String aVolume

The volume root path.

Returns
Type Description
DirectoryEntry

A directory entry for the volume.

Exceptions
Type Condition
System.ArgumentException

Thrown when aVolume is null or empty.

System.Exception

Unable to determine filesystem for path: + aVolume

System.ArgumentNullException

Thrown if aVolume / filesystem is null.

System.ArgumentOutOfRangeException

Thrown when root directory address is smaller then root directory address.

| Improve this Doc View Source

GetVolumes()

Gets the volumes for all registered file systems.

Declaration
public static List<DirectoryEntry> GetVolumes()
Returns
Type Description
System.Collections.Generic.List<DirectoryEntry>

A list of directory entries for all volumes.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if filesystem is null.

System.ArgumentOutOfRangeException

Thrown when root directory address is smaller then root directory address.

System.ArgumentException

Thrown when root path is null or empty.

| Improve this Doc View Source

GetVolumeSeparatorChar()

Get volume separator char.

Declaration
public static char GetVolumeSeparatorChar()
Returns
Type Description
System.Char

char value.

| Improve this Doc View Source

IsValidDriveId(String)

Check if drive id is valid.

Declaration
public static bool IsValidDriveId(string aPath)
Parameters
Type Name Description
System.String aPath
Returns
Type Description
System.Boolean

bool value.

Exceptions
Type Condition
System.ArgumentOutOfRangeException

Thrown if aPath length is smaller then 2, or greater than Int32.MaxValue.

| Improve this Doc View Source

RegisterVFS(VFSBase, Boolean, Boolean)

Register VFS. Initialize the VFS.

Declaration
public static void RegisterVFS(VFSBase aVFS, bool aShowInfo = true, bool aAllowReinitialise = false)
Parameters
Type Name Description
VFSBase aVFS

A VFS to register.

System.Boolean aShowInfo
System.Boolean aAllowReinitialise
Exceptions
Type Condition
System.Exception

Thrown if VFS already registered / memory error.

System.IO.IOException

Thrown on I/O exception.

System.ArgumentNullException

Thrown on memory error.

System.OverflowException

Thrown on memory error.

System.ArgumentException

Thrown on memory error.

System.ArgumentOutOfRangeException

Thrown on memory error.

System.IO.PathTooLongException

Thrown on fatal error.

System.IO.FileNotFoundException

Thrown on memory error.

System.IO.DirectoryNotFoundException

Thrown on fatal error.

| Improve this Doc View Source

SetFileAttributes(String, FileAttributes)

Sets the attributes for a File / Directory. Not implemented.

Declaration
public static void SetFileAttributes(string aPath, FileAttributes fileAttributes)
Parameters
Type Name Description
System.String aPath

The path of the File / Directory.

System.IO.FileAttributes fileAttributes

The attributes of the File / Directory.

Exceptions
Type Condition
System.NotImplementedException

Thrown always

| Improve this Doc View Source

SetFileSystemLabel(String, String)

Set file system type.

Declaration
public static void SetFileSystemLabel(string aDriveId, string aLabel)
Parameters
Type Name Description
System.String aDriveId

A drive id.

System.String aLabel

A label to be set.

Exceptions
Type Condition
System.ArgumentException

Thrown when aDriveId is null or empty.

System.Exception

Unable to determine filesystem for path: + aDriveId

| Improve this Doc View Source

SplitPath(String)

Split path.

Declaration
public static string[] SplitPath(string aPath)
Parameters
Type Name Description
System.String aPath

A path to split.

Returns
Type Description
System.String[]

string array.

Exceptions
Type Condition
System.ArgumentException

Thrown on fatal error.

| Improve this Doc View Source

ThrowIfNotRegistered()

Throws an Exception if VFS is not registered.

Declaration
public static void ThrowIfNotRegistered()
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
☀
☾