The File Manager Application is a command-line interface (CLI) tool designed to simplify file and directory management tasks. It provides a set of commands to perform basic file operations, navigate through directories, and gather information about the host machine's operating system. With support for Streams API, hash calculations, and file compression, this application offers a versatile set of features for users who prefer working in a terminal environment.
- Work using CLI
- Perform basic file operations (copy, move, delete, rename, etc.)
- Utilize Streams API
- Get information about the host machine operating system
- Perform hash calculations
- Compress and decompress files
- Node.js (version >= 20)
- Clone the repository:
git clone https://github.com/pavelhancharow/file-manager.git
- Change directory:
cd file-manager
- Change branch
git checkout develop
The program is started by npm script
in the following way:
npm run start -- --username=your_username
After starting app, the following text is displayed in the console:
Welcome to the File Manager, your_username!
To see all commands in the app, please press the TAB
button.
FM>
.exit add cat cd compress cp decompress hash ls mv os rm rn up
You can also start writing a command and press the TAB
button to automatically complete the command.
FM> c
cat cd compress cp
To reach a file or directory path, you don't need to write the path in single quotes 'path/directory'
, double quotes "path/directory/file.txt"
or backticks.
FM> compress src/text.txt files/text.br
To exit the app, please press ctrl + c
or enter the .exit
command in the app.
- Navigation & working directory (nwd):
- Go upper from current directory
up
- Go to dedicated folder from current directory
cd path_to_directory
- Print in console list of all files and folders in current directory
ls
- Go upper from current directory
- Basic operations with files:
- Read file
cat path_to_file
- Create empty file in current working directory
add new_file_name
- Rename file
rn path_to_file new_filename
- Copy file
cp path_to_file path_to_new_directory
- Move file
mv path_to_file path_to_new_directory
- Delete file
rm path_to_file
- Read file
- Operating system info:
- Get EOL
os --EOL
- Get host machine CPUs info
os --cpus
- Get home directory
os --homedir
- Get current system username
os --username
- Get CPU architecture
os --architecture
- Get EOL
- Hash operations:
- Calculate hash for file
hash path_to_file
- Calculate hash for file
- Zip operations:
- Compress file
compress path_to_file path_to_destination
- Decompress file
decompress path_to_file path_to_destination
- Compress file