C# Класс GSF.IO.FileStructure.TransactionalFileStructure

This class is responsible for managing the transactions that occur on the file system. Therefore, it keeps up with the latest snapshot of the file allocation table, permits only a single concurrent edit of the archive system, and determines when a file can be deleted when there are no read or write transactions. It also containst the IO system.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
BeginEdit ( ) : TransactionalEdit

This will start a transactional edit on the file.

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.

CreateFile ( string fileName, int blockSize ) : TransactionalFileStructure

Creates a new archive file using the provided file. File is editable.

CreateInMemory ( int blockSize ) : TransactionalFileStructure

Creates a new archive file that is completely in memory

Dispose ( ) : void

Releases all the resources used by the TransactionalFileStructure object.

OpenFile ( string fileName, bool isReadOnly ) : TransactionalFileStructure

Opens an existing file.

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

Метод Описание
OnTransactionCommitted ( ) : void
OnTransactionRolledBack ( ) : void
TransactionalFileStructure ( DiskIo diskIo ) : System

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

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

This will start a transactional edit on the file.
public BeginEdit ( ) : TransactionalEdit
Результат TransactionalEdit

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

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

Creates a new archive file using the provided file. File is editable.
public static CreateFile ( string fileName, int blockSize ) : TransactionalFileStructure
fileName string
blockSize int
Результат TransactionalFileStructure

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

Creates a new archive file that is completely in memory
public static CreateInMemory ( int blockSize ) : TransactionalFileStructure
blockSize int
Результат TransactionalFileStructure

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

Releases all the resources used by the TransactionalFileStructure object.
public Dispose ( ) : void
Результат void

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

Opens an existing file.
public static OpenFile ( string fileName, bool isReadOnly ) : TransactionalFileStructure
fileName string
isReadOnly bool
Результат TransactionalFileStructure