Hello,
Unfortunately is not possible to reuse the file system structures from the DataBurner
. In fact you should implement the file system tree and should manage the add/remove/rename operations. You should implement also the functionality which will recreate(restore) the files system for DataBurner from the your file system tree.
For example:
1) You define two classes FileDescriptor and FolderDescriptor where the FolderDescriptor class can extend the FileDescriptor class by adding some methods ... addxx, removexx etc.
The FileDescriptor class will keep the next data:
- Name
- Path -> if user attach the file/folder from the other place ( if file/folder is not the nested file/folder ) then this property will keep the full path to the source file/folder. Otherwise this property is EMPTY;
- NewName -> will be filled in case when user renames file/folder;
- IsDeleted -> in case when user deletes file/folder you should set TRUE value for this property. The descriptor should not be deleted!!!
The FileDescriptor class will keep additionally collection of nested items
2) How restore folder:
1.- you get the Folder descriptor from the your tree and:
- you check the IsDeleted property
- if IsDeleted is TRUE - we should check if file/folder is already exist in the DataBurner and should remove this if so , otherwise (if file/folder is not in DataBurner) you should don't append the file/folder into DataBurner!!
- if IsDeleted is FALSE then we should:
- check the Path property
- if Path property is not Empty ( the all file/folders objects for the top level will have this property filled!) it means that file/folder was added from the different place and thus we should add this file/folder into DataBurner manually ... ;
- if Path property is Empty - do nothing because file/folder is already in DataBurner!!
- you check the NewName property
- if NewName property is not Empty then you should Get the current file/folder object from the DataBurner and rename his!
- if NewName property is Empty - do nothing;
You should recursively repeat all off these steps for the nested files/folders for the added folder.
Regards,
Dmitry