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

Is there any 'flush' operation available in jcifs-ng #347

Open
anirudh-kac opened this issue Oct 17, 2023 · 2 comments
Open

Is there any 'flush' operation available in jcifs-ng #347

anirudh-kac opened this issue Oct 17, 2023 · 2 comments

Comments

@anirudh-kac
Copy link

Hi,
I am looking for an equivalent of a flush operation (something like fdatasync) that will ensure no data is in the buffer and is actually sent to the file over network.

@mbechler
Copy link
Contributor

mbechler commented Oct 18, 2023

The library does not keep any buffers outside of your control, i.e. when the write operation returns the amount of data indicated by the return value was transferred and acknowledged by the server - it would be up the caller to repeat the write with the remaining data.
To instruct the remote server to flush data to disc on the other hand there is an FLUSH operation in the SMB2 protocol. That operation is not currently exposed via public API, but I would be pretty easy to add that to SmbFileOutputStream, if that is what you need.

@anirudh-kac
Copy link
Author

Thanks!
I might need that. What would it take to have the interfacen for SmbFileOutputStream and SmbRandomAccessFile ?

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