Class VFSFile
Represents a TileDB VFS (Virtual File System) file object.
Implements
Namespace: TileDB.CSharp
Assembly: TileDB.CSharp.dll
Syntax
public sealed class VFSFile : IDisposable
Remarks
This class cannot be directly created. To obtain an instance of it, use Open(string, VfsMode).
Properties
| Edit this page View SourceIsClosed
Whether the file is closed.
Declaration
public bool IsClosed { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceClose()
Closes a file. This flushes the buffered data into the file when the file was opened in write (or append) mode.
Declaration
public void Close()
Remarks
It is particularly important to be called after S3 writes, as otherwise the writes will not take effect.
Dispose()
Disposes this VFSFile.
Declaration
public void Dispose()
Flush()
Flushes the file's internal buffers.
Declaration
public void Flush()
Remarks
This has no effect for S3.
ReadExactly(ulong, byte*, ulong)
Reads from the file at a specified offset.
Declaration
public void ReadExactly(ulong offset, byte* buffer, ulong count)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | offset | The offset to read from. |
| byte* | buffer | A pointer to the memory region where the file's data will be written into. |
| ulong | count | The number of bytes to read. |
Exceptions
| Type | Condition |
|---|---|
| Exception | The remaining data in the file after |
See Also
| Edit this page View SourceReadExactly(ulong, Span<byte>)
Reads from the file at a specified offset.
Declaration
public void ReadExactly(ulong offset, Span<byte> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | offset | The offset to read from. |
| Span<byte> | buffer | A Span<T> of bytes where the file's data will be written into. |
Remarks
If you want to read more than MaxValue bytes of data you should call ReadExactly(ulong, byte*, ulong).
Exceptions
| Type | Condition |
|---|---|
| Exception | The remaining data in the file after |
Write(byte*, ulong)
Writes data to the end of the file.
Declaration
public void Write(byte* buffer, ulong count)
Parameters
| Type | Name | Description |
|---|---|---|
| byte* | buffer | A pointer to the bytes that will be written. |
| ulong | count | The number of bytes to write. |
Remarks
If the file does not exist, it will be created.
Write(ReadOnlySpan<byte>)
Writes data to the end of the file.
Declaration
public void Write(ReadOnlySpan<byte> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<byte> | buffer | A ReadOnlySpan<T> of bytes whose content will be written. |
Remarks
If you want to write more than MaxValue bytes of data you should call Write(byte*, ulong).
If the file does not exist, it will be created.