Class VFS
Represents a TileDB VFS (Virtual File System) object.
Implements
Namespace: TileDB.CSharp
Assembly: TileDB.CSharp.dll
Syntax
public sealed class VFS : IDisposable
Constructors
| Edit this page View SourceVFS()
Creates a VFS.
Declaration
public VFS()
VFS(Context)
Declaration
public VFS(Context ctx)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The context to associate the VFS with. |
VFS(Context?, Config?)
Declaration
public VFS(Context? ctx = null, Config? config = null)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The context to associate the VFS with. Defaults to GetDefault() |
Config | config |
Methods
| Edit this page View SourceConfig()
Declaration
public Config Config()
Returns
Type | Description |
---|---|
Config |
CopyDir(string, string)
Copies a directory.
Declaration
public void CopyDir(string old_uri, string new_uri)
Parameters
Type | Name | Description |
---|---|---|
string | old_uri | The source URI of the directory. |
string | new_uri | The destination URI of the directory. Will be overwritten if it exists. |
CopyFile(string, string)
Copies a file.
Declaration
public void CopyFile(string old_uri, string new_uri)
Parameters
Type | Name | Description |
---|---|---|
string | old_uri | The source URI of the file. |
string | new_uri | The destination URI of the file. Will be overwritten if it exists. |
CreateBucket(string)
Creates an object-store bucket.
Declaration
public void CreateBucket(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The URI of the bucket to be created. |
CreateDir(string)
Creates a directory.
Declaration
public void CreateDir(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The directory's URI. |
DirSize(string)
Gets the size of a directory.
Declaration
public ulong DirSize(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The directory's URI. |
Returns
Type | Description |
---|---|
ulong |
Dispose()
Disposes this VFS.
Declaration
public void Dispose()
EmptyBucket(string)
Deletes the contents of an object-store bucket.
Declaration
public void EmptyBucket(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The URI of the bucket to be emptied. |
FileSize(string)
Gets the size of a file.
Declaration
public ulong FileSize(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The file's URI. |
Returns
Type | Description |
---|---|
ulong |
GetChildren(string)
Lists the top-level children of a directory.
Declaration
public List<string> GetChildren(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The URI of the directory. |
Returns
Type | Description |
---|---|
List<string> | A List<T> containing the children of the directory in |
Remarks
This function does not visit the children recursively; only the
top-level children of uri
will be visited.
GetChildrenRecursive(string)
Lists all files of a directory and its subdirectories recursively.
Declaration
public List<(string Uri, ulong Size)> GetChildrenRecursive(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The URI of the directory. |
Returns
Type | Description |
---|---|
List<(string Uri, ulong Size)> | A List<T> containing the files of the directory in |
Remarks
This operation is supported only on URIs to local file system, S3, Azure and GCS.
IsBucket(string)
Checks whether a URI points to a bucket.
Declaration
public bool IsBucket(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The URI to check. |
Returns
Type | Description |
---|---|
bool |
IsDir(string)
Checks whether a URI points to a directory.
Declaration
public bool IsDir(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The URI to check. |
Returns
Type | Description |
---|---|
bool |
IsEmptyBucket(string)
Checks whether a bucket is empty or not.
Declaration
public bool IsEmptyBucket(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The URI of the bucket to be checked. |
Returns
Type | Description |
---|---|
bool |
IsFile(string)
Checks whether a URI points to a file.
Declaration
public bool IsFile(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The URI to check. |
Returns
Type | Description |
---|---|
bool |
MoveDir(string, string)
Renames a directory.
Declaration
public void MoveDir(string old_uri, string new_uri)
Parameters
Type | Name | Description |
---|---|---|
string | old_uri | The source URI of the directory. |
string | new_uri | The destination URI of the directory. Will be overwritten if it exists. |
MoveFile(string, string)
Renames a file.
Declaration
public void MoveFile(string old_uri, string new_uri)
Parameters
Type | Name | Description |
---|---|---|
string | old_uri | The source URI of the file. |
string | new_uri | The destination URI of the file. Will be overwritten if it exists. |
Open(string, VfsMode)
Opens a file.
Declaration
public VFSFile Open(string uri, VfsMode mode)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The file's URI. |
VfsMode | mode | The mode in which the file is opened. |
Returns
Type | Description |
---|---|
VFSFile | A VFSFile object that can be used to perform operations on the file. |
RemoveBucket(string)
Removes an object-store bucket.
Declaration
public void RemoveBucket(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The URI of the bucket to be removed. |
RemoveDir(string)
Removes a directory.
Declaration
public void RemoveDir(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The directory's URI. |
RemoveFile(string)
Removes a file.
Declaration
public void RemoveFile(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The file's URI. |
Touch(string)
Touches a file, i.e., creates a new empty file.
Declaration
public void Touch(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The file's URI. |
VisitChildrenRecursive<T>(string, Func<string, ulong, T, bool>, T)
Visits all files of a directory and its subdirectories recursively.
Declaration
public void VisitChildrenRecursive<T>(string uri, Func<string, ulong, T, bool> callback, T callbackArg)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The URI of the directory to visit. |
Func<string, ulong, T, bool> | callback | A callback delegate that will be called with the URI of each file,
its size and |
T | callbackArg | An argument that will be passed to |
Type Parameters
Name | Description |
---|---|
T | The type of |
Remarks
This operation is supported only on URIs to local file system, S3, Azure and GCS.
VisitChildren<T>(string, Func<string, T, bool>, T)
Visits the top-level children of a directory.
Declaration
public void VisitChildren<T>(string uri, Func<string, T, bool> callback, T callbackArg)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The URI of the directory to visit. |
Func<string, T, bool> | callback | A callback delegate that will be called with the URI of each child and
|
T | callbackArg | An argument that will be passed to |
Type Parameters
Name | Description |
---|---|
T | The type of |
Remarks
This function does not visit the children recursively; only the
top-level children of uri
will be visited.