Git Product home page Git Product logo

das-dir-diff-j's Introduction

das-dir-diff-j

Simple diff tool for comparing directories written in Java.

There is nothing to use in this project yet!

TODO:

  • Next steps:
    • Support "exclude directories" (and handle exception "access denied")
    • Compare two files with the lists.
  • Compare directory files including contents (md5)
    • Done: Create implementation, which goes through the directory files, calculates their MD5 sums and stores them into text file.
    • Done: Create sub-command of the application, which uses the implementation from above and create those files.
    • Create unit tests for the algorithm, which writes hashes.
    • Create implementation, which would read the text files with relative paths and MD5 sums and compare them with the actual file system.
    • Create sub-command, which would use it.
    • Create unit tests for algorithms, which checks hashes.
  • Single dir analysis:
    • Add some profiling code. Measure, what takes time - listing of the files, or comparison etc. Experiment with it.
    • For the files get file size
    • For the files calculate some check-sum/hash.
    • For large files estimate access speed (how to do it intelligently)?
    • Report following things (create object to query this information, then also create the reports and corresponding command line options):
      • Name of dir being examined
      • Number of files, dirs, links, other objects
      • Total size of files, max file size
      • List all elements
        • Sort by type, by name, by size
      • Calculate dir sizes
      • Show largest dirs
      • Show number of files inside dirs (direct children/nested)
      • Sort by number of files
    • Think about how to print the report about content of the directory.
    • Advanced: Improve the results data structure, so that one can group files inside subdirectories, i.e. that one can take a subdirectory and list it's children
    • Advanced: implement it using "walk" and "walkTree" and see if any of the two have any benefits.
  • Dump information about some root dir as a file. Later use this file as a "side" for comparison.
  • write function to calculate the diff.
    • Improve the output of comparison:
      • Sort the output
      • If directory is missing, don't print the whole content, but onsly some status (like how many files are missing).
    • Add progress and some simple profiling print-outs - to see, what takes long time.
    • Write test-cases and unit tests for this method
    • Think, how to use it in for real thing.
  • Think how to make the API nice to be usable in interactive Java or Groovy session.

Target volume: 3M-5M fs items. Memory (very roughly: 0.5K*5M = 2.5G - should be OK. Adjust Java options?)

das-dir-diff-j's People

Contributors

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