complete file manager function