Kinetica   C#   API  Version 7.2.3.1
KineticaFileHandler Class Reference

Main class for handling file operations with Kinetica's KiFS (Kinetica File System). More...

+ Collaboration diagram for KineticaFileHandler:

Classes

class  Options
 Options for configuring the KineticaFileHandler behavior. More...
 

Public Member Functions

 KineticaFileHandler (Kinetica db)
 Constructs a KineticaFileHandler with the specified Kinetica connection. More...
 
 KineticaFileHandler (Kinetica db, Options options)
 Constructs a KineticaFileHandler with the specified Kinetica connection and options. More...
 
void Upload (string fileName, string remoteDirName)
 Uploads a single file to a KiFS directory using default options. More...
 
void Upload (string fileName, string remoteDirName, UploadOptions? uploadOptions, IFileUploadListener? callback)
 Uploads a single file to a KiFS directory. More...
 
void Upload (IList< string > fileNames, string remoteDirName)
 Uploads multiple files to a KiFS directory using default options. More...
 
void Upload (IList< string > fileNames, string remoteDirName, UploadOptions? uploadOptions, IFileUploadListener? callback)
 Uploads multiple files to a KiFS directory. More...
 
async Task UploadAsync (IList< string > fileNames, string remoteDirName, UploadOptions? uploadOptions=null, IFileUploadListener? callback=null)
 Uploads files asynchronously to a KiFS directory. More...
 
void Download (string fileName, string localDirName)
 Downloads a single file from KiFS to a local directory using default options. More...
 
void Download (string fileName, string localDirName, DownloadOptions? downloadOptions, IFileDownloadListener? callback)
 Downloads a single file from KiFS to a local directory. More...
 
void Download (IList< string > fileNames, string localDirName)
 Downloads multiple files from KiFS to a local directory using default options. More...
 
void Download (IList< string > fileNames, string localDirName, DownloadOptions? downloadOptions, IFileDownloadListener? callback)
 Downloads multiple files from KiFS to a local directory. More...
 
void DownloadDirectory (string remoteDirName, string localDirName, DownloadOptions? downloadOptions=null, IFileDownloadListener? callback=null)
 Downloads all files in a KiFS directory to a local directory. More...
 
async Task DownloadAsync (IList< string > fileNames, string localDirName, DownloadOptions? downloadOptions=null, IFileDownloadListener? callback=null)
 Downloads files asynchronously from KiFS to a local directory. More...
 
void CreateDirectory (string remoteDirName)
 Creates a KiFS directory, suppressing error if it already exists. More...
 
void CreateDirectory (string remoteDirName, bool noErrorIfExists)
 Creates a KiFS directory. More...
 
void DeleteDirectory (string remoteDirName)
 Deletes a KiFS directory and all files under it, suppressing error if it doesn't exist. More...
 
void DeleteDirectory (string remoteDirName, bool recursive, bool noErrorIfNotExists)
 Deletes a KiFS directory. More...
 
IList< KifsDirectoryInfoShowDirectories (IList< string > remoteDirNames)
 Returns statistics about the given KiFS directories. More...
 
IList< KifsDirectoryInfoShowDirectory (string remoteDirName)
 Returns statistics about a single KiFS directory. More...
 
IList< KifsDirectoryInfoShowAllDirectories ()
 Returns statistics about all KiFS directories. More...
 
void DeleteFiles (IList< string > fileNames)
 Deletes files from KiFS, suppressing error if files don't exist. More...
 
void DeleteFiles (IList< string > fileNames, bool noErrorIfNotExists)
 Deletes files from KiFS. More...
 
void DeleteFilesInDirectory (string remoteDirName)
 Deletes all files in a KiFS directory. More...
 
void DeleteFilesInDirectory (string remoteDirName, bool noErrorIfNotExists)
 Deletes all files in a KiFS directory. More...
 
IList< KifsFileInfoShowFiles (IList< string > remotePaths)
 Returns statistics about the given KiFS files. More...
 
bool KifsDirectoryExists (string dirName)
 Checks whether a KiFS directory exists. More...
 
bool KifsDirectoriesExist (ISet< string > dirNames)
 Checks whether multiple KiFS directories exist. More...
 
bool KifsFileExists (string fileName)
 Checks whether a KiFS file exists. More...
 

Public Attributes

const string KifsPathSeparator = "/"
 Separator character between a KiFS directory and file name. More...
 
const string KifsPathPrefix = "kifs://"
 Prefix to use when referencing KiFS files (e.g., for file ingest). More...
 
const string RemoteUserHomeDirPrefix = "~"
 Alias for a user's home directory. More...
 
const long DefaultFileSizeToSplit = 62914560
 Default file size threshold for multi-part uploads (60 MB). More...
 
const int DefaultThreadPoolSize = 5
 Default thread pool size for file operations. More...
 
Options FileHandlerOptions => _options
 Gets the options for this file handler. More...
 

Detailed Description

Main class for handling file operations with Kinetica's KiFS (Kinetica File System).

Provides methods to upload, download, and manage files and directories in KiFS.

This class exposes the KiFS API for file operations including:

  • Upload files to KiFS
  • Download files from KiFS
  • Create and delete directories
  • List files and directories
  • Check existence of files and directories

Supported file path patterns include standard Glob syntax (e.g., *.csv, data/**, file_?.txt).

Definition at line 26 of file KineticaFileHandler.cs.

Constructor & Destructor Documentation

◆ KineticaFileHandler() [1/2]

KineticaFileHandler.KineticaFileHandler ( Kinetica  db)
inline

Constructs a KineticaFileHandler with the specified Kinetica connection.

Parameters
dbThe Kinetica instance used to access KiFS.

Definition at line 61 of file KineticaFileHandler.cs.

◆ KineticaFileHandler() [2/2]

KineticaFileHandler.KineticaFileHandler ( Kinetica  db,
Options  options 
)
inline

Constructs a KineticaFileHandler with the specified Kinetica connection and options.

Parameters
dbThe Kinetica instance used to access KiFS.
optionsOptions for configuring file transfer behavior.

Definition at line 70 of file KineticaFileHandler.cs.

Member Function Documentation

◆ CreateDirectory() [1/2]

void KineticaFileHandler.CreateDirectory ( string  remoteDirName)
inline

Creates a KiFS directory, suppressing error if it already exists.

Parameters
remoteDirNameName of the KiFS directory to create.

Definition at line 490 of file KineticaFileHandler.cs.

◆ CreateDirectory() [2/2]

void KineticaFileHandler.CreateDirectory ( string  remoteDirName,
bool  noErrorIfExists 
)
inline

Creates a KiFS directory.

Parameters
remoteDirNameName of the KiFS directory to create.
noErrorIfExistsWhether to suppress error if directory already exists.

Definition at line 500 of file KineticaFileHandler.cs.

◆ DeleteDirectory() [1/2]

void KineticaFileHandler.DeleteDirectory ( string  remoteDirName)
inline

Deletes a KiFS directory and all files under it, suppressing error if it doesn't exist.

Parameters
remoteDirNameName of the KiFS directory to delete.

Definition at line 516 of file KineticaFileHandler.cs.

◆ DeleteDirectory() [2/2]

void KineticaFileHandler.DeleteDirectory ( string  remoteDirName,
bool  recursive,
bool  noErrorIfNotExists 
)
inline

Deletes a KiFS directory.

Parameters
remoteDirNameName of the KiFS directory to delete.
recursiveWhether to delete all files and subdirectories.
noErrorIfNotExistsWhether to suppress error if directory doesn't exist.

Definition at line 527 of file KineticaFileHandler.cs.

◆ DeleteFiles() [1/2]

void KineticaFileHandler.DeleteFiles ( IList< string >  fileNames)
inline

Deletes files from KiFS, suppressing error if files don't exist.

Parameters
fileNamesList of KiFS file paths to delete.

Definition at line 634 of file KineticaFileHandler.cs.

◆ DeleteFiles() [2/2]

void KineticaFileHandler.DeleteFiles ( IList< string >  fileNames,
bool  noErrorIfNotExists 
)
inline

Deletes files from KiFS.

Parameters
fileNamesList of KiFS file paths to delete.
noErrorIfNotExistsWhether to suppress error if files don't exist.

Definition at line 644 of file KineticaFileHandler.cs.

◆ DeleteFilesInDirectory() [1/2]

void KineticaFileHandler.DeleteFilesInDirectory ( string  remoteDirName)
inline

Deletes all files in a KiFS directory.

Parameters
remoteDirNameName of the KiFS directory containing files to delete.

Definition at line 660 of file KineticaFileHandler.cs.

◆ DeleteFilesInDirectory() [2/2]

void KineticaFileHandler.DeleteFilesInDirectory ( string  remoteDirName,
bool  noErrorIfNotExists 
)
inline

Deletes all files in a KiFS directory.

Parameters
remoteDirNameName of the KiFS directory containing files to delete.
noErrorIfNotExistsWhether to suppress error if directory doesn't exist.

Definition at line 670 of file KineticaFileHandler.cs.

◆ Download() [1/4]

void KineticaFileHandler.Download ( string  fileName,
string  localDirName 
)
inline

Downloads a single file from KiFS to a local directory using default options.

Parameters
fileNamePath of the KiFS file to download.
localDirNamePath of the local directory to download to.

Definition at line 379 of file KineticaFileHandler.cs.

◆ Download() [2/4]

void KineticaFileHandler.Download ( string  fileName,
string  localDirName,
DownloadOptions downloadOptions,
IFileDownloadListener callback 
)
inline

Downloads a single file from KiFS to a local directory.

Parameters
fileNamePath of the KiFS file to download.
localDirNamePath of the local directory to download to.
downloadOptionsOptions for the download operation.
callbackOptional callback for download progress notifications.

Definition at line 391 of file KineticaFileHandler.cs.

◆ Download() [3/4]

void KineticaFileHandler.Download ( IList< string >  fileNames,
string  localDirName 
)
inline

Downloads multiple files from KiFS to a local directory using default options.

Parameters
fileNamesPaths of the KiFS files to download.
localDirNamePath of the local directory to download to.

Definition at line 401 of file KineticaFileHandler.cs.

◆ Download() [4/4]

void KineticaFileHandler.Download ( IList< string >  fileNames,
string  localDirName,
DownloadOptions downloadOptions,
IFileDownloadListener callback 
)
inline

Downloads multiple files from KiFS to a local directory.

Parameters
fileNamesPaths of the KiFS files to download.
localDirNamePath of the local directory to download to.
downloadOptionsOptions for the download operation.
callbackOptional callback for download progress notifications.

Definition at line 413 of file KineticaFileHandler.cs.

◆ DownloadAsync()

async Task KineticaFileHandler.DownloadAsync ( IList< string >  fileNames,
string  localDirName,
DownloadOptions downloadOptions = null,
IFileDownloadListener callback = null 
)
inline

Downloads files asynchronously from KiFS to a local directory.

Parameters
fileNamesPaths of the KiFS files to download.
localDirNamePath of the local directory to download to.
downloadOptionsOptions for the download operation.
callbackOptional callback for download progress notifications.

Definition at line 477 of file KineticaFileHandler.cs.

◆ DownloadDirectory()

void KineticaFileHandler.DownloadDirectory ( string  remoteDirName,
string  localDirName,
DownloadOptions downloadOptions = null,
IFileDownloadListener callback = null 
)
inline

Downloads all files in a KiFS directory to a local directory.

Parameters
remoteDirNamePath of the KiFS directory to download.
localDirNamePath of the local directory to download to.
downloadOptionsOptions for the download operation.
callbackOptional callback for download progress notifications.

Definition at line 457 of file KineticaFileHandler.cs.

◆ KifsDirectoriesExist()

bool KineticaFileHandler.KifsDirectoriesExist ( ISet< string >  dirNames)
inline

Checks whether multiple KiFS directories exist.

Parameters
dirNamesSet of full KiFS directory paths to check.
Returns
True if all directories exist, false otherwise.

Definition at line 734 of file KineticaFileHandler.cs.

◆ KifsDirectoryExists()

bool KineticaFileHandler.KifsDirectoryExists ( string  dirName)
inline

Checks whether a KiFS directory exists.

Parameters
dirNameFull KiFS directory path to check.
Returns
True if the directory exists, false otherwise.

Definition at line 713 of file KineticaFileHandler.cs.

◆ KifsFileExists()

bool KineticaFileHandler.KifsFileExists ( string  fileName)
inline

Checks whether a KiFS file exists.

Parameters
fileNameFull KiFS file path to check.
Returns
True if the file exists, false otherwise.

Definition at line 756 of file KineticaFileHandler.cs.

◆ ShowAllDirectories()

IList<KifsDirectoryInfo> KineticaFileHandler.ShowAllDirectories ( )
inline

Returns statistics about all KiFS directories.

Returns
List of KifsDirectoryInfo objects.

Definition at line 607 of file KineticaFileHandler.cs.

◆ ShowDirectories()

IList<KifsDirectoryInfo> KineticaFileHandler.ShowDirectories ( IList< string >  remoteDirNames)
inline

Returns statistics about the given KiFS directories.

Parameters
remoteDirNamesList of KiFS directory names.
Returns
List of KifsDirectoryInfo objects.

Definition at line 547 of file KineticaFileHandler.cs.

◆ ShowDirectory()

IList<KifsDirectoryInfo> KineticaFileHandler.ShowDirectory ( string  remoteDirName)
inline

Returns statistics about a single KiFS directory.

Parameters
remoteDirNameName of the KiFS directory.
Returns
List of KifsDirectoryInfo objects.

Definition at line 581 of file KineticaFileHandler.cs.

◆ ShowFiles()

IList<KifsFileInfo> KineticaFileHandler.ShowFiles ( IList< string >  remotePaths)
inline

Returns statistics about the given KiFS files.

Parameters
remotePathsList of KiFS file or directory paths.
Returns
List of KifsFileInfo objects.

Definition at line 681 of file KineticaFileHandler.cs.

◆ Upload() [1/4]

void KineticaFileHandler.Upload ( string  fileName,
string  remoteDirName 
)
inline

Uploads a single file to a KiFS directory using default options.

Parameters
fileNameName and path of the local file (or glob pattern) to upload.
remoteDirNameName of the KiFS directory to upload to.

Definition at line 88 of file KineticaFileHandler.cs.

◆ Upload() [2/4]

void KineticaFileHandler.Upload ( string  fileName,
string  remoteDirName,
UploadOptions uploadOptions,
IFileUploadListener callback 
)
inline

Uploads a single file to a KiFS directory.

Parameters
fileNameName and path of the local file (or glob pattern) to upload.
remoteDirNameName of the KiFS directory to upload to.
uploadOptionsOptions for the upload operation.
callbackOptional callback for upload progress notifications.

Definition at line 100 of file KineticaFileHandler.cs.

◆ Upload() [3/4]

void KineticaFileHandler.Upload ( IList< string >  fileNames,
string  remoteDirName 
)
inline

Uploads multiple files to a KiFS directory using default options.

Parameters
fileNamesNames and paths of the local files (or glob patterns) to upload.
remoteDirNameName of the KiFS directory to upload to.

Definition at line 110 of file KineticaFileHandler.cs.

◆ Upload() [4/4]

void KineticaFileHandler.Upload ( IList< string >  fileNames,
string  remoteDirName,
UploadOptions uploadOptions,
IFileUploadListener callback 
)
inline

Uploads multiple files to a KiFS directory.

Parameters
fileNamesNames and paths of the local files (or glob patterns) to upload.
remoteDirNameName of the KiFS directory to upload to.
uploadOptionsOptions for the upload operation.
callbackOptional callback for upload progress notifications.

Definition at line 122 of file KineticaFileHandler.cs.

◆ UploadAsync()

async Task KineticaFileHandler.UploadAsync ( IList< string >  fileNames,
string  remoteDirName,
UploadOptions uploadOptions = null,
IFileUploadListener callback = null 
)
inline

Uploads files asynchronously to a KiFS directory.

Parameters
fileNamesNames and paths of the local files (or glob patterns) to upload.
remoteDirNameName of the KiFS directory to upload to.
uploadOptionsOptions for the upload operation.
callbackOptional callback for upload progress notifications.

Definition at line 188 of file KineticaFileHandler.cs.

Member Data Documentation

◆ DefaultFileSizeToSplit

const long KineticaFileHandler.DefaultFileSizeToSplit = 62914560

Default file size threshold for multi-part uploads (60 MB).

Files larger than this will be uploaded in parts.

Definition at line 47 of file KineticaFileHandler.cs.

◆ DefaultThreadPoolSize

const int KineticaFileHandler.DefaultThreadPoolSize = 5

Default thread pool size for file operations.

Definition at line 52 of file KineticaFileHandler.cs.

◆ FileHandlerOptions

Options KineticaFileHandler.FileHandlerOptions => _options

Gets the options for this file handler.

Definition at line 79 of file KineticaFileHandler.cs.

◆ KifsPathPrefix

const string KineticaFileHandler.KifsPathPrefix = "kifs://"

Prefix to use when referencing KiFS files (e.g., for file ingest).

Definition at line 36 of file KineticaFileHandler.cs.

◆ KifsPathSeparator

const string KineticaFileHandler.KifsPathSeparator = "/"

Separator character between a KiFS directory and file name.

Definition at line 31 of file KineticaFileHandler.cs.

◆ RemoteUserHomeDirPrefix

const string KineticaFileHandler.RemoteUserHomeDirPrefix = "~"

Alias for a user's home directory.

Definition at line 41 of file KineticaFileHandler.cs.


The documentation for this class was generated from the following file: