The task is to implement File Manager using Node.js APIs. See full description here.
The file manager should be able to do the following:
- 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
Launch an app
npm run start
Launch an app with a username
npm run start -- --username=your_username
Exit an app
.exit
Go up from the current directory
up
Navigate to another folder from the current directory
cd path_to_directory
List all files and folders in the current directory
ls
Read a file and print its content to console
cat path_to_file
Create an empty file in the current working directory
add new_file_name
Rename a file:
rn path_to_file new_filename
Copy a file
cp path_to_file path_to_new_directory
Move a file (the initial file will be deleted)
mv path_to_file path_to_new_directory
Delete a file
rm path_to_file
Print operating system info:
- Get EOL (default system End-Of-Line)
os --EOL
- Get host machine CPUs info
os --cpus
- Get the home directory
os --homedir
- Get the current system user name
os --username
- Get CPU architecture
os --architecture
Calculate hash for a file
hash path_to_file
Compress a file (using Brotli algorithm)
compress path_to_file path_to_destination
Decompress file (using Brotli algorithm)
decompress path_to_file path_to_destination