Giter Site home page Giter Site logo

file-manager-nodejs's Introduction

File Manager

Assignment: File Manager

Technical requirements

  • No external dependencies should be required
  • Use 18 LTS version of Node.js
  • The program is started by npm-script start in following way:
npm run start -- --username=your_username

List of operations and their syntax:

  • Navigation & working directory (nwd)
    • Go upper from current directory (when you are in the root folder this operation shouldn't change working directory)
    up
    • Go to dedicated folder from current directory (path_to_directory can be relative or absolute)
    cd path_to_directory
    • Print in console list of all files and folders in current directory. List should contain:
      • list should contain files and folder names (for files - with extension)
      • folders and files are sorted in alphabetical order ascending, but list of folders goes first
      • type of directory content should be marked explicitly (e.g. as a corresponding column value)
    ls
    Example of how ls command output may look like
    ls output example
  • Basic operations with files
    • Read file and print it's content in console (should be done using Readable stream):
    cat path_to_file
    • Create empty file in current working directory:
    add new_file_name
    • Rename file (content should remain unchanged):
    rn path_to_file new_filename
    • Copy file (should be done using Readable and Writable streams):
    cp path_to_file path_to_new_directory
    • Move file (same as copy but initial file is deleted, copying part should be done using Readable and Writable streams):
    mv path_to_file path_to_new_directory
    • Delete file:
    rm path_to_file
  • Operating system info (prints following information in console)
    • Get EOL (default system End-Of-Line) and print it to console
    os --EOL
    • Get host machine CPUs info (overall amount of CPUS plus model and clock rate (in GHz) for each of them) and print it to console
    os --cpus
    • Get home directory and print it to console
    os --homedir
    • Get current system user name (Do not confuse with the username that is set when the application starts) and print it to console
    os --username
    • Get CPU architecture for which Node.js binary has compiled and print it to console
    os --architecture
  • Hash calculation
    • Calculate hash for file and print it into console
    hash path_to_file
  • Compress and decompress operations
    • Compress file (using Brotli algorithm, should be done using Streams API)
    compress path_to_file path_to_destination
    • Decompress file (using Brotli algorithm, should be done using Streams API)
    decompress path_to_file path_to_destination
    NB! After decompressing of previously compressed file result should not differ with originally compressed file

file-manager-nodejs's People

Contributors

i0rdan 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.