convert FileManagerController to TypeScript