-
Notifications
You must be signed in to change notification settings - Fork 27
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
Pathname#write does not work #13
Comments
Hi @mikz, thanks for your feedback. Could you provide a code example that could help reproduce your issue? I know it's a large issue but having a starting point would be cool :) |
require 'memfs'
MemFs.activate!
path = Pathname('folder/file')
MemFs.touch(path)
File.exist?(path.to_s) or raise 'fail'
path.write('test') also there is another bug with Pathname, and it is: require 'memfs'
path = Pathname('folder/file')
File.exist?(path.to_s) == File.exist?(path) or raise 'failed'
MemFs.activate!
File.exist?(path.to_s) == File.exist?(path) or raise 'failed' It raises
because it tries to call |
Thank you ! I'll try to work on this issue in the coming days ;) |
Ok I started to look into it and it will probably take time since I'll have to literally replace |
Hey @simonc, I am curious about the status of this issue, as there are other
I'd be happy to help with a PR for this, somehow, although I'm afraid I'm not sure how one would go about implementing C classes in MemFs. It could be that we just need to tack on a |
Hey @awolfson. Sadly I ended up not having enough time to dig the subject. The only thing I can think of, regarding Regarding the Anyway, I pushed what I had started on the pathname-support branch if anyone is interested in taking a stab at it 😁 |
Pathname is implemented in C and does not reflect MemFS filesystem.
The text was updated successfully, but these errors were encountered: