Code Monkey home page Code Monkey logo

file-manager's Introduction

File Manager Application

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.

Table of Contents

Features

  • 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

Installation

Prerequisites

  • Node.js (version >= 20)

Steps

  1. Clone the repository:
git clone https://github.com/pavelhancharow/file-manager.git
  1. Change directory:
cd file-manager
  1. Change branch
git checkout develop

Usage

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.

Examples

  • 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
  • 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
  • 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
  • Hash operations:
    • Calculate hash for file
      hash path_to_file
  • Zip operations:
    • Compress file
      compress path_to_file path_to_destination
    • Decompress file
      decompress path_to_file path_to_destination

file-manager's People

Contributors

pavelhancharow avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.