C# Класс Mosa.FileSystem.FAT.FatFileSystem

Наследование: GenericFileSystem
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
lastFreeHint uint

Открытые методы

Метод Описание
AddCluster ( uint lastCluster ) : uint

Adds the cluster.

AllocateFirstCluster ( uint directorySector, uint directorySectorIndex ) : uint

Allocates the first cluster.

CreateFile ( string filename, FatFileAttributes fileAttributes ) : FatFileLocation

Creates the file.

CreateFile ( string filename, FatFileAttributes fileAttributes, uint directoryCluster ) : FatFileLocation

Creates the file.

CreateVFSMount ( ) : IFileSystem

Creates the VFS mount.

Delete ( uint targetCluster, uint directorySector, uint directorySectorIndex ) : void

Deletes the specified file or directory

FatFileSystem ( IPartitionDevice partition ) : Mosa.ClassLib

Initializes a new instance of the FatFileSystem class.

FindEntry ( string name ) : FatFileLocation
FindNthCluster ( uint start, uint count ) : uint

Finds the Nth cluster.

Format ( FatSettings fatSettings ) : bool

Formats the partition with specified fat settings.

GetFileSize ( uint directoryBlock, uint index ) : uint

Gets the size of the file.

GetNextCluster ( uint start ) : uint

Gets the next cluster.

GetSectorByCluster ( uint cluster ) : uint

Gets the sector by cluster.

GetSectorsPerClusterByTotalSectors ( FatType type, uint sectors ) : byte

Gets the sectors per cluster by total sectors.

ReadCluster ( uint cluster, byte block ) : bool

Reads the cluster.

ReadCluster ( uint cluster ) : byte[]

Reads the cluster.

SetVolumeName ( string volumeName ) : void

Sets the name of the volume.

UpdateLength ( uint size, uint firstCluster, uint directorySector, uint directorySectorIndex ) : void

Updates the length.

WriteCluster ( uint cluster, byte block ) : bool

Writes the cluster.

Защищенные методы

Метод Описание
AllocateCluster ( ) : uint

Allocates the cluster.

FreeClusterChain ( uint firstCluster ) : bool

Frees the cluster chain.

GetClusterBySector ( uint sector ) : uint

Gets the cluster by sector.

GetClusterEntryValue ( uint cluster ) : uint

Gets the cluster entry value.

IsClusterBad ( uint cluster ) : bool

Determines whether [is cluster bad] [the specified cluster].

IsClusterFree ( uint cluster ) : bool

Determines whether [is cluster free] [the specified cluster].

IsClusterLast ( uint cluster ) : bool

Determines whether [is cluster last] [the specified cluster].

IsClusterReserved ( uint cluster ) : bool

Determines whether [is cluster reserved] [the specified cluster].

IsValidFatCharacter ( char c ) : bool

Determines whether [is valid fat character] [the specified c].

ReadBootSector ( ) : bool

Reads the boot sector.

SetClusterEntryValue ( uint cluster, uint nextcluster ) : bool

Sets the cluster entry value.

Приватные методы

Метод Описание
ExtractFileName ( byte directory, uint index ) : string

Extracts the name of the file.

FindEntry ( FatFileSystem compare, uint startCluster ) : FatFileLocation

Finds the entry.

GetClusterEntry ( byte data, uint index, FatType type ) : uint

Gets the cluster entry.

Описание методов

AddCluster() публичный Метод

Adds the cluster.
public AddCluster ( uint lastCluster ) : uint
lastCluster uint The last cluster.
Результат uint

AllocateCluster() защищенный Метод

Allocates the cluster.
protected AllocateCluster ( ) : uint
Результат uint

AllocateFirstCluster() публичный Метод

Allocates the first cluster.
public AllocateFirstCluster ( uint directorySector, uint directorySectorIndex ) : uint
directorySector uint The directory sector.
directorySectorIndex uint Index of the directory sector.
Результат uint

CreateFile() публичный Метод

Creates the file.
public CreateFile ( string filename, FatFileAttributes fileAttributes ) : FatFileLocation
filename string The filename.
fileAttributes FatFileAttributes The file attributes.
Результат FatFileLocation

CreateFile() публичный Метод

Creates the file.
public CreateFile ( string filename, FatFileAttributes fileAttributes, uint directoryCluster ) : FatFileLocation
filename string The filename.
fileAttributes FatFileAttributes The file attributes.
directoryCluster uint The directory cluster.
Результат FatFileLocation

CreateVFSMount() публичный Метод

Creates the VFS mount.
public CreateVFSMount ( ) : IFileSystem
Результат IFileSystem

Delete() публичный Метод

Deletes the specified file or directory
public Delete ( uint targetCluster, uint directorySector, uint directorySectorIndex ) : void
targetCluster uint The target cluster.
directorySector uint The directory sector.
directorySectorIndex uint Index of the directory sector.
Результат void

FatFileSystem() публичный Метод

Initializes a new instance of the FatFileSystem class.
public FatFileSystem ( IPartitionDevice partition ) : Mosa.ClassLib
partition IPartitionDevice The partition.
Результат Mosa.ClassLib

FindEntry() публичный Метод

public FindEntry ( string name ) : FatFileLocation
name string
Результат FatFileLocation

FindNthCluster() публичный Метод

Finds the Nth cluster.
public FindNthCluster ( uint start, uint count ) : uint
start uint The start.
count uint The count.
Результат uint

Format() публичный Метод

Formats the partition with specified fat settings.
public Format ( FatSettings fatSettings ) : bool
fatSettings FatSettings The fat settings.
Результат bool

FreeClusterChain() защищенный Метод

Frees the cluster chain.
protected FreeClusterChain ( uint firstCluster ) : bool
firstCluster uint The first cluster.
Результат bool

GetClusterBySector() защищенный Метод

Gets the cluster by sector.
protected GetClusterBySector ( uint sector ) : uint
sector uint The sector.
Результат uint

GetClusterEntryValue() защищенный Метод

Gets the cluster entry value.
protected GetClusterEntryValue ( uint cluster ) : uint
cluster uint The cluster.
Результат uint

GetFileSize() публичный Метод

Gets the size of the file.
public GetFileSize ( uint directoryBlock, uint index ) : uint
directoryBlock uint The directory block.
index uint The index.
Результат uint

GetNextCluster() публичный Метод

Gets the next cluster.
public GetNextCluster ( uint start ) : uint
start uint The start.
Результат uint

GetSectorByCluster() публичный Метод

Gets the sector by cluster.
public GetSectorByCluster ( uint cluster ) : uint
cluster uint The cluster.
Результат uint

GetSectorsPerClusterByTotalSectors() публичный статический Метод

Gets the sectors per cluster by total sectors.
public static GetSectorsPerClusterByTotalSectors ( FatType type, uint sectors ) : byte
type FatType The type.
sectors uint The sectors.
Результат byte

IsClusterBad() защищенный Метод

Determines whether [is cluster bad] [the specified cluster].
protected IsClusterBad ( uint cluster ) : bool
cluster uint The cluster.
Результат bool

IsClusterFree() защищенный Метод

Determines whether [is cluster free] [the specified cluster].
protected IsClusterFree ( uint cluster ) : bool
cluster uint The cluster.
Результат bool

IsClusterLast() защищенный Метод

Determines whether [is cluster last] [the specified cluster].
protected IsClusterLast ( uint cluster ) : bool
cluster uint The cluster.
Результат bool

IsClusterReserved() защищенный Метод

Determines whether [is cluster reserved] [the specified cluster].
protected IsClusterReserved ( uint cluster ) : bool
cluster uint The cluster.
Результат bool

IsValidFatCharacter() защищенный статический Метод

Determines whether [is valid fat character] [the specified c].
protected static IsValidFatCharacter ( char c ) : bool
c char The c.
Результат bool

ReadBootSector() защищенный Метод

Reads the boot sector.
protected ReadBootSector ( ) : bool
Результат bool

ReadCluster() публичный Метод

Reads the cluster.
public ReadCluster ( uint cluster, byte block ) : bool
cluster uint The cluster.
block byte The block.
Результат bool

ReadCluster() публичный Метод

Reads the cluster.
public ReadCluster ( uint cluster ) : byte[]
cluster uint The cluster.
Результат byte[]

SetClusterEntryValue() защищенный Метод

Sets the cluster entry value.
protected SetClusterEntryValue ( uint cluster, uint nextcluster ) : bool
cluster uint The cluster.
nextcluster uint The next cluster.
Результат bool

SetVolumeName() публичный Метод

Sets the name of the volume.
public SetVolumeName ( string volumeName ) : void
volumeName string Name of the volume.
Результат void

UpdateLength() публичный Метод

Updates the length.
public UpdateLength ( uint size, uint firstCluster, uint directorySector, uint directorySectorIndex ) : void
size uint The size.
firstCluster uint The first cluster.
directorySector uint The directory sector.
directorySectorIndex uint Index of the directory sector.
Результат void

WriteCluster() публичный Метод

Writes the cluster.
public WriteCluster ( uint cluster, byte block ) : bool
cluster uint The cluster.
block byte The block.
Результат bool

Описание свойств

lastFreeHint защищенное свойство

protected uint lastFreeHint
Результат uint