Reloading the folder tree with a trigger

Hello,

I use the code in the following url as a folder tree.

I am deleting a selected directory or file in this folder tree. There’s no problem here

When the file or directory deleted message notification window closes, I want the folder tree to be reset and reloaded

when it triggers the following code

getfilelist( $('#container') , 'Sample' );

Reinstalled under the “eeee” folder that was deleted without resetting the folder tree.


It is required to remove the deleted folder from the tree.
OR
How can it be removed without reinstalling?

I thought it would be more convenient to remove the (deleted) line from the selected folder/file rather than reloading it

Deleted line li

<li class="folder expanded"><a href="#" rel="13AmdSc_9eQhycbWWgYDeIHQtTGPi_Zbe" adi="eeee" class="aktif">eeee<span style="float: right;color: black;padding-right: 10px;">4.00 KB</span></a><ul id="uzak" class="filetree" style=""></ul></li>

I removed the selected line with the following code
I don’t know how correct the code is

function satirsil(dosya) {
  $('ul#uzak li a.aktif').each(function() {
      if($.trim($(this).attr('adi'))==$.trim(dosya)) {
          $(this).closest('li').remove();
      }
  });
}