ReadingCapabilities Property

The reading capabilities supported by the external storage.

Syntax

public int ReadingCapabilities { get; set; }
Public Property ReadingCapabilities As Integer

Default Value

0x418

Remarks

This property specifies any and all behaviors of the external storage which are relevant when reading data from it. The cache will automatically alter its own behavior based on this property's "description" of how the external storage is able to provide file data.

This property should be set by OR'ing together zero or more of the following flags:

RWCAP_CONTINUOUS_FROM_ZERO0x00000001No random access allowed; read/write operations must start at the beginning of a file.

RWCAP_CONTINUOUS_FROM_END0x00000002Append only; write operations must start at the end of a file.

To overwrite a file, it must first be truncated, and then written to. (Truncation behavior is defined by the corresponding flags.)

RWCAP_BLOCK_MULTIPLE0x00000004Reading/writing is possible at positions that are multiple of the corresponding block size.

The read and write block sizes are specified by the ReadBlockSize and WriteBlockSize properties.

RWCAP_RANDOM0x00000008Reading/writing is possible at any position.

Note that other flags can still alter the positions at which reading/writing are possible.

RWCAP_POSITION_ONLY_WITHIN_FILE0x00000010File position must remain in the range: 0 <= FilePos < FileSize

RWCAP_POSITION_NOT_BEYOND_EOF_ON_WRITE0x00000020File position remain in the range: 0 <= FilePos <= FileSize

When writing, appending to the end of the file is supported, but writing at positions past the end of the file is not.

RWCAP_SIZE_WHOLE_FILE0x00000100Only whole-file reads/writes are possible; partial reads/writes are not supported.

Notes:

  • The ReadBlockSize and WriteBlockSize properties should still be set to reasonable values when using this flag.
  • Use one of the other RWCAP_SIZE_* flags instead of this one if the external storage supports reading subsets of the file.

RWCAP_SIZE_FIXED_BLOCK_WITH_TAIL0x00000200Reads/writes must be done in blocks of a fixed size, except for the last block, which may be of any size.

RWCAP_SIZE_FIXED_BLOCK_NO_TAIL0x00000400Reads/writes must be done in blocks of a fixed size, including the last block.

Note: Real file sizes, if needed, must be stored elsewhere when using the cache with an external storage medium that has this characteristic.

RWCAP_SIZE_ANY0x00000800Reads/writes may be done in blocks of any size.

RWCAP_WRITE_TRUNCATES_FILE0x00001000When writes occur, the last data written becomes the new end of the file. Any overwritten data, and any data previously present after the written range, is lost.

RWCAP_WRITE_KEEPS_FILESIZE0x00002000Normal writing behavior; i.e., writes do not alter a file's size (except possibly to expand it).

RWCAP_NO_WRITE_BEYOND_EOF0x00004000Writes may not extend past the end of a file's current size (i.e., cannot cause a file to grow).

Applications may still adjust the file size beforehand.

Note: This property cannot be changed when Active is true.

 
 
Copyright (c) 2020 Callback Technologies, Inc. - All rights reserved.
CBFS Cache 2020 .NET Edition - Version 20.0 [Build 7647]