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

Fake file Size in MemFS #34

Open
lordofscripts opened this issue Aug 27, 2024 · 0 comments
Open

Fake file Size in MemFS #34

lordofscripts opened this issue Aug 27, 2024 · 0 comments

Comments

@lordofscripts
Copy link

  • Directory size (when iterating through MemFS) is reported as 0, whereas in a real File System it reports the size of the directory entry in the file system (not size of contained files!)
  • It would be nice to be able to create a MemFS with the option to fake the file size when using Create. I mean fake without actually stuffing the file so as to save memory)

Why? I have a utility function that mimics a real file system (os) into a memfs instance. I do it to implement a dry run. By faking tbe file object size one could save memory and still do a run and being able to calculate sizes based on the reported fake size.

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

No branches or pull requests

1 participant