Code Monkey home page Code Monkey logo

file-utils's Issues

file-utils merge command

Description

bin/file-utils merge filename1.ext filename2.ext ...
This command should take a variable argument list containing filenames separated by spaces.

This should first check if all the files are legitimate and then it should merge them all in order into a single file.

For now, this should output the merged file to STDOUT, however, in a later iteration we would need to add a flag or argument that allows us to specify an output file.

Additional Information

(If you have any ideas about how to add an output file arg in a neat manner, feel free to ask).

more object-oriented design?

Currently, file-utils uses basic top-down procedural logic-building. Should we move away from that and obtain a more object-oriented design, where we create objects like File with their set of attributes like length, size along with set of public / private methods to read and alter the content?

file-utils delete command

file-utils delete filename.ext

This command should delete the file passed, and output some data about the space freed, etc.
Before deleting, this should check if the user has permissions to delete the file, and it should also error out if someone passes in the name of a directory.

Check if help's formatting renders properly

Description

Set up the project in your local environment, following the instructions given in the README file. Run the bin/file-utils help command and check if the output looks like this -

Screenshot 2022-10-18 at 1 50 49 PM

Screenshot 2022-10-18 at 1 51 06 PM

If there are any discrepancies, feel free to open an issue under bug report.

Additional Information

It would be great if we can test and confirm if this renders properly in the following environments:

  • MacOS
  • Windows 11
  • Windows 7
  • Windows XP
  • Ubuntu

file-utils move command

bin/file-utils move filename1.ext filename2.ext
On running this command, the contents of filename1.ext should be read and copied to filename2.ext. After that, filename1.ext should be deleted.

file-utils diff command

bin/file-utils diff filename1.txt filename2.txt
This command should generate a diff using the two filenames provided, and output it to STDOUT. In a later iteration, we could add an option or a flag for an output filename.

[FEAT]: Add a command parser

Feature Request

Is your feature request related to a problem? Please describe:

Code was modified to include individual commands as subclasses of the Command class.

Open main.cpp and implement the parsing logic used by the if-else statements to map the Args object to a given command based on the value in the first arg. It's alright if the -h flag breaks.

Describe the solution you'd like

Additional context

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.