• 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 FileSystem

FileSystem abstract class.

Inheritance
System.Object
FileSystem
ISO9660FileSystem
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
Assembly: Cosmos.System2.dll
Syntax
public abstract class FileSystem

Constructors

| Improve this Doc View Source

FileSystem(Partition, String, Int64)

Initializes a new instance of the FileSystem class.

Declaration
protected FileSystem(Partition aDevice, string aRootPath, long aSize)
Parameters
Type Name Description
Partition aDevice

A partiton managed by the filesystem.

System.String aRootPath

A root path.

System.Int64 aSize

A partition size.

Properties

| Improve this Doc View Source

AvailableFreeSpace

Get available free space.

Declaration
public abstract long AvailableFreeSpace { get; }
Property Value
Type Description
System.Int64
| Improve this Doc View Source

Device

Get device.

Declaration
protected Partition Device { get; }
Property Value
Type Description
Partition
| Improve this Doc View Source

Label

Get label.

Declaration
public abstract string Label { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

RootPath

Get root path.

Declaration
public string RootPath { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Size

Get size.

Declaration
public long Size { get; }
Property Value
Type Description
System.Int64
| Improve this Doc View Source

TotalFreeSpace

Get total free space.

Declaration
public abstract long TotalFreeSpace { get; }
Property Value
Type Description
System.Int64
| Improve this Doc View Source

Type

Get type.

Declaration
public abstract string Type { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

CreateDirectory(DirectoryEntry, String)

Create directory.

Declaration
public abstract DirectoryEntry CreateDirectory(DirectoryEntry aParentDirectory, string aNewDirectory)
Parameters
Type Name Description
DirectoryEntry aParentDirectory

A parent directory.

System.String aNewDirectory

A new directory name.

Returns
Type Description
DirectoryEntry

DirectoryEntry value.

Exceptions
Type Condition
System.ArgumentNullException
  • Thrown when aParentDirectory is null.
  • aNewDirectory is null or empty.
  • 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 / memory error.

System.ArgumentException

Thrown on memory error.

System.RankException

Thrown on fatal error.

System.ArrayTypeMismatchException

Thrown on fatal error.

System.InvalidCastException

Thrown on memory error.

| Improve this Doc View Source

CreateFile(DirectoryEntry, String)

Create file.

Declaration
public abstract DirectoryEntry CreateFile(DirectoryEntry aParentDirectory, string aNewFile)
Parameters
Type Name Description
DirectoryEntry aParentDirectory

A parent directory.

System.String aNewFile

A new file name.

Returns
Type Description
DirectoryEntry

DirectoryEntry value.

Exceptions
Type Condition
System.ArgumentNullException
  • Thrown when aParentDirectory is null.
  • aNewFile is null or empty.
  • 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 / memory error.

System.ArgumentException

Thrown on memory error.

System.RankException

Thrown on fatal error.

System.ArrayTypeMismatchException

Thrown on fatal error.

System.InvalidCastException

Thrown on memory error.

| Improve this Doc View Source

DeleteDirectory(DirectoryEntry)

Delete directory.

Declaration
public abstract void DeleteDirectory(DirectoryEntry aPath)
Parameters
Type Name Description
DirectoryEntry aPath
Exceptions
Type Condition
System.NotImplementedException

Thrown when given entry type is unknown.

System.Exception
  • Thrown when tring to delete root directory.
  • directory entry type is invalid.
  • data size invalid.
  • FAT table not found.
  • out of memory.
System.OverflowException

Thrown when data lenght is greater then Int32.MaxValue.

System.ArgumentNullException
  • Thrown when aDirectoryEntry is null.
  • aData is null.
  • Out of memory.
System.RankException

Thrown on fatal error.

System.ArrayTypeMismatchException

Thrown on fatal error.

System.InvalidCastException

Thrown when the data in aData is corrupted.

System.ArgumentOutOfRangeException
  • Thrown when the data length is 0 or greater then Int32.MaxValue.
  • Entrys matadata offset value is invalid.
System.ArgumentException
  • aData length is 0.
System.NotSupportedException

Thrown when FAT type is unknown.

| Improve this Doc View Source

DeleteFile(DirectoryEntry)

Delete file.

Declaration
public abstract void DeleteFile(DirectoryEntry aPath)
Parameters
Type Name Description
DirectoryEntry aPath
Exceptions
Type Condition
System.NotImplementedException

Thrown when given entry type is unknown.

System.Exception
  • Thrown when tring to delete root directory.
  • directory entry type is invalid.
  • data size invalid.
  • FAT table not found.
  • out of memory.
System.OverflowException
  • Thrown when data lenght is greater then Int32.MaxValue.
  • The number of clusters in the FAT entry is greater than Int32.MaxValue.
System.ArgumentNullException
  • Thrown when aDirectoryEntry is null.
  • aData is null.
  • Out of memory.
System.RankException

Thrown on fatal error.

System.ArrayTypeMismatchException

Thrown on fatal error.

System.InvalidCastException

Thrown when the data in aData is corrupted.

System.ArgumentOutOfRangeException
  • Thrown when the data length is 0 or greater then Int32.MaxValue.
  • The size of the chain is less then zero.
  • Entrys matadata offset value is invalid.
System.ArgumentException
  • Thrown when FAT type is unknown.
  • aData length is 0.
System.NotSupportedException

Thrown when FAT type is unknown.

| Improve this Doc View Source

DisplayFileSystemInfo()

Print filesystem info.

Declaration
public abstract void DisplayFileSystemInfo()
Exceptions
Type Condition
System.IO.IOException

Thrown on I/O error.

| Improve this Doc View Source

Format(String, Boolean)

Format drive. (delete all)

Declaration
public abstract void Format(string aDriveFormat, bool aQuick)
Parameters
Type Name Description
System.String aDriveFormat

unused.

System.Boolean aQuick

unused.

Exceptions
Type Condition
System.ArgumentOutOfRangeException
  • Thrown when the data length is 0 or greater then Int32.MaxValue.
  • Entrys matadata offset value is invalid.
  • Fatal error.
System.ArgumentNullException

Thrown when filesystem is null / memory error.

System.ArgumentException
  • Data length is 0.
  • Root path is null or empty.
  • Memory error.
System.Exception
  • Thrown when data size invalid.
  • Thrown on unknown file system type.
  • Thrown on fatal error.
System.OverflowException

Thrown when data lenght is greater then Int32.MaxValue.

System.NotImplementedException

Thrown when FAT type is unknown.

System.RankException

Thrown on fatal error.

System.ArrayTypeMismatchException

Thrown on fatal error.

System.InvalidCastException

Thrown when the data in aData is corrupted.

System.NotSupportedException

Thrown when FAT type is unknown.

| Improve this Doc View Source

GetDirectoryListing(DirectoryEntry)

Get list of sub-directories in a directory.

Declaration
public abstract List<DirectoryEntry> GetDirectoryListing(DirectoryEntry baseDirectory)
Parameters
Type Name Description
DirectoryEntry baseDirectory

A base directory.

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

DirectoryEntry list.

Exceptions
Type Condition
System.ArgumentNullException

Thrown when baseDirectory is null / memory error.

System.OverflowException

Thrown when data lenght is greater then Int32.MaxValue.

System.Exception

Thrown when data size invalid / invalid directory entry type.

System.ArgumentException

Thrown on memory error.

System.ArgumentOutOfRangeException

Thrown on memory error.

| Improve this Doc View Source

GetRootDirectory()

Get root directory.

Declaration
public abstract DirectoryEntry GetRootDirectory()
Returns
Type Description
DirectoryEntry

DirectoryEntry value.

Exceptions
Type Condition
System.ArgumentOutOfRangeException

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

System.ArgumentNullException

Thrown when filesystem is null.

System.ArgumentException

Thrown when root path is null or empty.

  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
☀
☾