Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add file.stat() #81

Merged
merged 1 commit into from
Feb 6, 2019
Merged

add file.stat() #81

merged 1 commit into from
Feb 6, 2019

Conversation

ripienaar
Copy link
Contributor

No description provided.

@ripienaar
Copy link
Contributor Author

quick attempt at adding #80, please let me know if you need any changes or a different approach.

Copy link
Owner

@d5 d5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!! Left some comments. Please update documentation too!

@ripienaar
Copy link
Contributor Author

let me know how this looks, if good I'll open a followup for readall

@d5
Copy link
Owner

d5 commented Feb 6, 2019

Yeah, this is good!!

  1. Can you add a test for os.stat? (See text_test if you need examples)
  2. Please add os.lstat too. Should be easy.
  3. Doc: please add FileInfo (like ProcessState), then update to stat(string) => FileInfo

@ripienaar
Copy link
Contributor Author

Addressed the tests and docs - prefer other functions in a separate PR

- `mtime`: time the file was last modified
- `size`: file size in bytes
- `mode`: file permissions as in int, comparable to octal permissions
- `directory`: boolean indicating if the file is a directory
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasnt sure how you want these as the other examples only show methods so just tried this to see

@d5 d5 merged commit a9224a3 into d5:master Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants