You can perform various actions with files and folders in File Manager. The actions are presented in the popup menu called "Actions". It is activated by right-clicking on a folder/file in the Tree or Files view or by clicking the Menu button on the toolbar.
However, you can also customize actions by means of redefining the corresponding methods.
To copy a folder/file, use the copyFile() method:
fmanager.copyFile(source,target);
To move a folder/file, use the moveFile() method:
fmanager.moveFile(source,target);
To delete a folder/file, use the deleteFile() method:
fmanager.deleteFile(ids);
To rename a folder/file, use the renameFile() method:
fmanager.renameFile("file1","newFile.txt");
To create a folder, use the createFolder() method. You need to pass an id of the folder where you want to create a new folder and templateCreate will apply other properties automatically:
fmanager.createFolder("folder1");
To download a file, you need to call the download() method and pass the file id to it:
fmanager.download("myfile");
To open a file upload dialog, use the uploadFile() method:
fmanager.uploadFile("myfolder");
Back to top