Git Product home page Git Product logo

path-tree-generator's People

Watchers

 avatar  avatar

path-tree-generator's Issues

Add additional optional fields from the file system (stats) to ListEntry

As a user I would like to have additional optional fields, regarding a directory or file for getting more information out of a PathTree instance.

  • size: total size, in bytes
  • atime: time of last access
  • ctime: time of last change
  • mtime: time of last modification
  • gid: group ID of owner
  • mode: protection bits
  • uid: user ID of owner

Refactor: Allow only `pathlib.Path` as type for the `path` field in `ListEntry`model

I'll suggest to use a pathlib.Path type only instead of also allowing a str to set in ListEntry model. This would be more straight forward for returning only one type, instead of guessing the right one.

In case of getting relative_paths out of the model, we can then use one of the following implementations in _PathTreeGenerator:

  • p.relative_to(self._root_dir), if relative_paths=True
  • p.relative_to('.'), if relative_paths=False

This can makt it easier to determine the absolute or relative path of a ListEntry in PathTree(...).tree().

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.