Show / Hide Table of Contents

Class VFSFile

Represents a TileDB VFS (Virtual File System) file object.

Inheritance
object
VFSFile
Implements
IDisposable
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 Source

IsClosed

Whether the file is closed.

Declaration
public bool IsClosed { get; }
Property Value
Type Description
bool

Methods

| Edit this page View Source

Close()

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.

| Edit this page View Source

Dispose()

Disposes this VFSFile.

Declaration
public void Dispose()
| Edit this page View Source

Flush()

Flushes the file's internal buffers.

Declaration
public void Flush()
Remarks

This has no effect for S3.

| Edit this page View Source

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 offset are less than count.

See Also
ReadExactly(ulong, Span<byte>)
| Edit this page View Source

ReadExactly(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 offset are less than buffer's Length.

| Edit this page View Source

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.

| Edit this page View Source

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.

Implements

IDisposable
  • Edit this page
  • View Source
In this article
Back to top Copyright © 2018-2023 TileDB Inc.