Method | Description | |
---|---|---|
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 ioBlockSize, int fileStructureBlockSize ) : |
Creates a file with the supplied name
|
|
Dispose ( ) : void |
Releases all the resources used by the CustomFileStream object.
|
|
FlushFileBuffers ( ) : void |
Flushes any temporary data to the disk. This also calls WindowsAPI function to have the OS flush to the disk.
|
|
OpenFile ( string fileName, int ioBlockSize, int &fileStructureBlockSize, bool isReadOnly, bool isSharingEnabled ) : |
Opens a file
|
|
Read ( long position, |
Reads an entire page at the provided location. Also computes the checksum information.
|
|
ReadRaw ( long position, byte buffer, int length ) : int |
Reads data from the disk
|
|
Write ( long currentEndOfCommitPosition, |
Writes all of the dirty blocks passed onto the disk subsystem. Also computes the checksum for the data.
|
|
WriteRaw ( long position, byte buffer, int length ) : void |
Writes data to the disk
|
Method | Description | |
---|---|---|
CustomFileStream ( ) : System |
Creates a resource list that everyone shares.
|
|
CustomFileStream ( |
Creates a new CustomFileStream
|
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. |
return | void |
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. |
return | void |
public static CreateFile ( string fileName, int ioBlockSize, int fileStructureBlockSize ) : |
||
fileName | string | the name of the file |
ioBlockSize | int | the number of bytes to do all io with |
fileStructureBlockSize | int | the number of bytes in the file structure so checksums can be properly computed. |
return |
public static OpenFile ( string fileName, int ioBlockSize, int &fileStructureBlockSize, bool isReadOnly, bool isSharingEnabled ) : |
||
fileName | string | the name of the file. |
ioBlockSize | int | the number of bytes to do all of the io |
fileStructureBlockSize | int | The number of bytes in the file structure |
isReadOnly | bool | if the file should be opened in read only |
isSharingEnabled | bool | if the file should be opened with read sharing permissions. |
return |
public Read ( long position, |
||
position | long | The stream position. May be any position inside the desired block |
locationToCopyData | The place where to write the data to. | |
return | void |
public ReadRaw ( long position, byte buffer, int length ) : int | ||
position | long | The starting position |
buffer | byte | the byte buffer of data to read |
length | int | the number of bytes to read |
return | int |
public Write ( long currentEndOfCommitPosition, |
||
currentEndOfCommitPosition | long | the last valid byte of the file system where this data will be appended to. |
stream | the source of the data to dump to the disk | |
length | long | The number by bytes to write to the file system. |
waitForWriteToDisk | bool | True to wait for a complete commit to disk before returning from this function. |
return | void |
public WriteRaw ( long position, byte buffer, int length ) : void | ||
position | long | The starting position |
buffer | byte | the byte buffer of data to write |
length | int | the number of bytes to write |
return | void |