I'm using CBFS to representate files from an ECS S3 storage. I mount the storage as a network drive (similar to your SFTP-example) and the representation of the files in windows explorer works very well.
When I open a file I open a stream to the remote file and read from it in the "OnReadFile". This works fine as well for most files.

My primary problem is on saving files. On most files I can stream back the file when "OnWriteFile" is called. But the Microsoft Office products handles save on a special way with creating temporary files and rename them back to the original (even different on Word, Excel, PP). Probably you already noticed that.
Is there a known workaround or best practice to handle this issue? Or do I really have to implement my own way?
My intention is to save the file temporary local and handle/redirect all the events (create temp file, write to temp file, rename to original/upload). But this is pretty intense workload for a problem that probably appears for everyone using eldos with remote files.
Do you have a hint or solution to my problem?

There is no some strict way to handle this issue. But maybe the best is implement a local cache where recently used data is placed (read and written by callbacks) and by means of a worker thread synchronize this cache asynchronously with the remote storage.

We use cookies to help provide you with the best possible online experience. By using this site, you agree that we may store and access cookies on your device. You can find out more about and set your own preferences here.