Manage MFT FS Folders
Data structures
FTHFolderData
Folder object data
| Data Type | Field Name | Description |
|---|---|---|
| int | FolderID | ID of a newly created folder |
| int | ParentFolderID | ID of a parent folder |
| string | Name | Name of new folder |
| int | EffectivePermission | Effective access permission for new folder for currently signed user Permission enum: None = 0×00, //0 Show = 0×01, //1 Read = 0×02, //2 Create = 0×04, //4 Download = 0×08, //8 Distribute = 0×010, //16 Manage = 0×020, //32 Modify = 0×040, //64 Delete = 0×080, //128 FullControl = Read, Create, Download, Distribute, Manage, Modify, Delete |
| DateTime | DateCreated | Timestamp when the folder was created |
| DateTime | DateModified | Timestamp when the folder was modified |
| int | CreatedByUserID | ID of the user who created the file |
| int | ModifiedByUserID | ID of the user who modified the file |
| bool | IsDeleted | Flag shows if the folder is deleted |
| int | FolderType | One of the following Folder Types: Regular = 0, Root = 1, UserHome = 2, UserDocuments = 3, UserDropBox = 4, FolderRoot = 5, HomeRoot = 6, |
Methods
CreateFolder
Creates a folder in MFT FS file system
FTHFolderData
CreateFolder(Guid sessionID, int parentFolderID, string name)
| Parameter Name | Description |
|---|---|
sessionID | User session returned by one of the Open functions |
parentFolderID | ID for the parent folder where new folder will be created |
name | Name for a new folder |
DeleteFolder
Deletes a folder in MFT FS file system
FTHFolderData
DeleteFolder(Guid sessionID, int folderID)
| Parameter Name | Description |
|---|---|
sessionID | User session returned by one of the Open functions |
folderID | ID of the folder to be deleted |
GetFolder
Retrieves folder data from MFT FS system by folder ID
FTHFolderData
GetFolder(Guid sessionID, int folderID)
| Parameter Name | Description |
|---|---|
sessionID | User session returned by one of the Open functions |
folderID | ID of the folder to be retrieved |
GetFolders
Retrieves a list of subfolders in the specified parent folder of MFT FS file system.
FTHFolderData[]
GetFolders (Guid sessionID, int parentFolderID, int index, int length)
| Parameter Name | Description |
|---|---|
sessionID | User session returned by one of the Open functions |
parentFolderID | ID of the parent folder where we look for subfolders |
index | Index points to the first subfolder to start retrieval, zero-based |
length | Number of subfolders to retrieve. |
GetFolderByName
Retrieves a single folder by name in the specified parent folder of MFT FS file system.
FTHFolderData
GetFolderByName(guid SessionID, int parentFolderID, string name)
| Parameter Name | Description |
|---|---|
sessionID | User session returned by one of the Open functions |
parentFolderID | ID of the parent folder where we look for a folder |
name | Name string by which a folder will be retrieved. Result is unambiguous since folder/file name is unique in the parent folder |
GetRootFolder
Retrieves a Root folder object in MFT FS file system.
FTHFolderData
GetRootFolder (Guid sessionID)
| Parameter Name | Description |
|---|---|
sessionID | User session returned by one of the Open functions |
MoveFolders
Moves a list of folders to a folder specified by destination folder ID.
void
MoveFolders(Guid sessionID, int[] folderIDList, int destinationFolderID)
| Parameter Name | Description |
|---|---|
sessionID | User session returned by one of the Open functions |
folderIDList | List of folder IDs that will be moved to a destination folder |
destinationFolderID | ID of destination folder where the folders will be moved |
SaveFolder
Saves changes to a folder object.
FTHFolderData SaveFolder(Guid sessionID, FTHFolderData folder)
| Parameter Name | Description |
|---|---|
sessionID | User session returned by one of the Open functions |
folder | Folder object |
GetFolderCount
Retrieves the count of subfolders in the specified parent folder.
int
GetFolderCount (Guid sessionID, int parentFolderID)
| Parameter Name | Description |
|---|---|
sessionID | User session returned by one of the Open functions |
parentFolderID | ID of the parent folder where subfolders are counted |
GetFolderPath
The method returns folder path in MFT FS file system as a string.
string
GetFolderPath (Guid sessionID, int parentFolderID)
| Name | Description |
|---|---|
sessionID | User session returned by one of the Open functions |
folderID | ID of the folder for which the path is retrieved |
GetFolderSize
Returns total size of files located in specified folder sub-tree in bytes, long value.
long
GetFolderSize (Guid sessionID, int folderID)
| Parameter Name | Description |
|---|---|
sessionID | User session returned by one of the Open functions |
folderID | ID of the folder for which the size is retrieved |
Was this topic helpful?