IFile
Description
- Derived from
-
IDisposableGeneric<IFile>
IFileOps
IFlushable
ICanReadWrite
IPathInfo - Extended by
-
FileBase abstract
Base interface for classes that represent binary objects with random-access semantics.
Public / Methods
GetLength
Returns the current length of this binary object.
- IOException
-
If an I/O error has occurred.
GetTimestamp
Returns the timestamp of the last file modification.
If SetTimestamp has been called, this method will return the provided timestamp value. Otherwise, the method will fetch the timestamp from the underlying filesystem each time is it called.
- IOException
-
If an I/O error has occurred.
Read
Reads a chunk of bytes from the binary object.
The actual number of read bytes may be lower than count opt when reading over the end of the binary object. The maximum number of bytes that can be read with a single call is 2^31-1
.
- IOException
-
If an I/O error has occurred.
ReadAll
Reads a chunk of bytes from the binary object.
The maximum number of bytes that can be read with a single call is 2^31-1
.
- IOException
-
If an I/O error has occurred.
SetLength
Sets the length of this binary object.
Setting the length of a binary object may cause additional management overhead by the OS and should only be done when absolutely necessary.
- IOException
-
If an I/O error has occurred.
SetTimestamp
Sets the timestamp of the last file modification.
Once called, the GetTimestamp will return timestamp in. The new timestamp may not become apparent to the underlying filesystem immediately, but it will when this file is disposed, at the latest.
- IOException
-
If an I/O error has occurred.
Write
Writes a chunk of bytes to the file.
The maximum number of bytes that can be written with a single call is 2^31-1
. Writing past the end of the binary object will cause it to grow automatically.
- IOException
-
If an I/O error has occurred.