C# Класс GSF.IO.FileStructure.Media.DiskIo

The IO system that the entire file structure uses to acomplish it's IO operations. This class hands data one block at a time to requesting classes and is responsible for checking the footer data of the file for corruption.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
ChangeExtension ( string extension, bool isReadOnly, bool isSharingEnabled ) : void

Changes the extension of the current file.

ChangeShareMode ( bool isReadOnly, bool isSharingEnabled ) : void

Reopens the file with different permissions.

CommitChanges ( FileHeaderBlock header ) : void

Occurs when committing the following data to the disk. This will copy any pending data to the disk in a manner that will protect against corruption.

CreateDiskIoSession ( FileHeaderBlock header, SubFileHeader file ) : DiskIoSession

Creates a DiskIoSession that can be used to perform basic read/write functions.

CreateFile ( string fileName, MemoryPool pool, int fileStructureBlockSize ) : DiskIo
CreateMemoryFile ( MemoryPool pool, int fileStructureBlockSize ) : DiskIo
Dispose ( ) : void

Releases the unmanaged resources used by the DiskIo object and optionally releases the managed resources.

OpenFile ( string fileName, MemoryPool pool, bool isReadOnly ) : DiskIo
RollbackChanges ( ) : void

Occurs when rolling back a transaction. This will free up any temporary space allocated for the change.

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

Метод Описание
DiskIo ( DiskMedium stream, bool isReadOnly ) : System

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

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

Changes the extension of the current file.
public ChangeExtension ( string extension, bool isReadOnly, bool isSharingEnabled ) : void
extension string the new extension
isReadOnly bool If the file should be reopened as readonly
isSharingEnabled bool If the file should share read privileges.
Результат void

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

Reopens the file with different permissions.
public ChangeShareMode ( bool isReadOnly, bool isSharingEnabled ) : void
isReadOnly bool If the file should be reopened as readonly
isSharingEnabled bool If the file should share read privileges.
Результат void

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

Occurs when committing the following data to the disk. This will copy any pending data to the disk in a manner that will protect against corruption.
public CommitChanges ( FileHeaderBlock header ) : void
header FileHeaderBlock
Результат void

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

Creates a DiskIoSession that can be used to perform basic read/write functions.
public CreateDiskIoSession ( FileHeaderBlock header, SubFileHeader file ) : DiskIoSession
header FileHeaderBlock
file SubFileHeader
Результат DiskIoSession

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

public static CreateFile ( string fileName, MemoryPool pool, int fileStructureBlockSize ) : DiskIo
fileName string
pool GSF.IO.Unmanaged.MemoryPool
fileStructureBlockSize int
Результат DiskIo

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

public static CreateMemoryFile ( MemoryPool pool, int fileStructureBlockSize ) : DiskIo
pool GSF.IO.Unmanaged.MemoryPool
fileStructureBlockSize int
Результат DiskIo

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

Releases the unmanaged resources used by the DiskIo object and optionally releases the managed resources.
public Dispose ( ) : void
Результат void

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

public static OpenFile ( string fileName, MemoryPool pool, bool isReadOnly ) : DiskIo
fileName string
pool GSF.IO.Unmanaged.MemoryPool
isReadOnly bool
Результат DiskIo

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

Occurs when rolling back a transaction. This will free up any temporary space allocated for the change.
public RollbackChanges ( ) : void
Результат void