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

file.Sync is not implemented #86

Open
wmcnamee-coreweave opened this issue Oct 10, 2024 · 1 comment
Open

file.Sync is not implemented #86

wmcnamee-coreweave opened this issue Oct 10, 2024 · 1 comment

Comments

@wmcnamee-coreweave
Copy link

I was interested in atomic file writes using Billy interface, but I found that file.Sync method is not implemented.

e.g.

https://github.com/google/renameio/blob/master/tempfile.go#L150
https://github.com/tailscale/tailscale/blob/main/atomicfile/atomicfile.go#L44
https://github.com/natefinch/atomic/blob/master/atomic.go#L43

https://pkg.go.dev/os#File.Sync

Can this be implemented or a helper function added?

@pjbgf
Copy link
Member

pjbgf commented Oct 10, 2024

@wmcnamee-coreweave we should be able to add support to it on both osfs implementations. But we won't be able to add it to the billy.Filesystem interface, due to the Liskov Substitution Principle.

Feel free to propose a PR for this.

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

2 participants