Waiting for engine...
Skip to main content

Manage Files and File metadata

Updated 

Data Structures​

FTHFileMetadataItemData​

File metadata in a form of name = value pairs

Data TypeField NameDescription
intFileMetadataIDID of a metadata item
intFileIDID of a file for which metadata is created
stringNameName of metadata item
intDataTypeMetadata type, extendable
objectDataMetadata value

FTHFileData​

MFT FS File object data

Data TypeField NameDescription
intFileIDID of a file in MFT FS server
intParentFolderIDID of a parent folder that contains a file
stringNameName of a file
longSizeFile size
intEffectivePermissionEffective permission of a file (reserved for future use)
DateTimeDateCreatedDate when a file was created
DateTimeDateModifiedDate when a file was modified last time
intCreatedByUserIDID of the user who created the file
intModifiedByUserIDID of the user who modified the file last time
intVersionFile version (reserved for future use)
boolIsDeletedFlag shows if a file is in Deleted state
boolIsQuarantinedFlag shows if a file is in Quarantined state, means that file body was removed by Anti-virus software.
boolIsPublishedFlag shows that a file is published into one of MFT FS collections.

Methods​

DeleteFile​

Deletes file object in MFT FS system. File body will be deleted later after Purge waiting period is over.

void
DeleteFile(Guid sessionID, int fileID)
Parameter NameDescription
SessionIDUser session returned by one of the Open functions
fileIDID of the file to be deleted

GetFile​

Retrieves a specific file object in MFT FS system by file ID.

note

method does not retrieve a file body, it should be downloaded using HTTP GET call to URL servername/download.aspx, refer to Programmatic File and Folder Transfers.

FTHFileData
GetFile(Guid sessionID, int fileID)
Parameter NameDescription
sessionIDUser session returned by one of the Open functions
fileIDID of the file object to be retrieved

GetFileByName​

Retrieves a specific file object from MFT FS system by specific file name, which is unique in the parent folder.

note

Method does not retrieve a file body, it should be downloaded using HTTP GET call to URL servername/download.aspx, refer to Programmatic File and Folder Transfers.

FTHFileData
GetFileByName(Guid sessionID, int parentFolderID, string name)
Parameter NameDescription
SessionIDUser session returned by one of the Open functions
parentFolderIDID of the parent folder that contains the file
NameFile name

GetFileCount​

Returns number of files in the specified parent folder.

int
GetFileCount(Guid sessionID, int parentFolderID)
Parameter NameDescription
sessionIDUser session returned by one of the Open functions
parentFolderIDID of the parent folder that contains the files to be counted

GetFiles​

Retrieves an array of file objects in the specified parent folder.

note

Method does not retrieve the file bodies, each file should be downloaded using HTTP GET call to URL servername/download.aspx, refer to Programmatic File and Folder Transfers.

FTHFileData[]
GetFiles(Guid sessionID, int parentFolderID, int index, int length)
Parameter NameDescription
sessionIDUser session returned by one of the Open functions
parentFolderIDID of the parent folder that contains the files to be retrieved
indexStarting index for retrieval
lengthNumber of elements to retrieve

GetFilePath​

Retrieves file path in MFT FS server to specific file.

string
GetFilePath(Guid sessionID, int fileID)
Parameter NameDescription
sessionIDUser session returned by one of the Open functions
fileIDID of the file for which the path is retrieved

MoveFiles​

Moves specified files to destination folder.

void
MoveFiles(Guid sessionID, int[] fileIDList, int destinationFolderID)
Parameter NameDescription
sessionIDUser session returned by one of the Open functions
fileIDListList of file IDs that should be moved to destination folder
destinationFolderIDDestination folder where the files will be moved

SaveFile​

Saves changes to a MFT FS file object, different from overwriting file body.
Changes internal fields of file object. Effective use is to rename the file only.

FTHFileData
SaveFile(Guid sessionID, FTHFileData file)
Parameter NameDescription
sessionIDUser session returned by one of the Open functions
fileFile object that should be saved

CreateFileMetadata​

Creates metadata for a specific file in a form of name = value pair

FTHFileMetadataItemData
CreateFileMetadata (Guid sessionID, int fileID, string name, object data)
Parameter NameDescription
sessionIDUser session returned by one of the Open functions
fileIDID of the file for which the metadata is created
nameMetadata item name
dataMetadata value

GetFileMetadata​

Retrieves array of metadata items for a specific file.

FTHFileMetadataItemData[]
GetFileMetadata(Guid sessionID, int fileID)
Parameter NameDescription
SessionIDUser session returned by one of the Open functions
fileIDID of the file for which the metadata is retrieved

SaveFileMetadata​

Saves metadata for a specific file.

FTHFileMetadataItemData
SaveFileMetadata(Guid sessionID, int fileID, string name, object data)
Parameter NameDescription
sessionIDUser session returned by one of the Open functions
fileIDID of the file for which the metadata is saved
nameMetadata item name
dataMetadata value
On this Page