Filemanager Deep Copy

If I select a group of files and copy and paste - we have that working where the ids of the new files are updated client side - so that a subsequent call to say rename works because it has the correct unique id.

When we do a copy of a folder with sub files, the new folder has the correct id. but the child nodes have the incorrect id - basically the id for them is /filename
How do we pass pack the deep folder set of new ids - or do we force a refresh of everything - if so how?

You can use TreeStore methods: eachSubItem and changeId:

fmanager.data.eachSubItem(id, function(item){
    var newId = ...
    this.changeId(item.id,  newId);
});

But what event would I attach to?
Right now we just have a handler defined for the copy action.
we have a handler for onErrorResponse.
we would need something like onAfterCopy

You can use onSuccessResponse event (we will add it in docs):

fmanager.attachEvent("onSuccessResponse", function(request, response){
   	// your code here
});

Thanks - the documentation online needs to be updated :slight_smile: