User story: As a developer, I'd like to have the developer documentation required to detect from within my application software whether a file is being (actively) selectively synced with Dropbox so that my software can treat those files as (effectively) having a size of zero bytes on disk.
Background: GrandPerspective is an open source filesystem visualizer that graphically displays the disk usage of a file system. (MacOS only.) Currently, GrandPerspective considers a file that is selectively-synced as occupying space on disc equal to the file size of the file as-if it were local. It is unaware that the local copy of a file is actually only a placeholder that (effectively) uses zero bytes on disk.
Is there an existing listing (or is it possible to get (here) a listing) of the operating system services, data types, etc. to detect the existince, and attributes of a selectively sync'd file sufficiently to be able to treat it as using zero bytes on disk?
(Or, better, is there any interested engineer at Dropbox that wants to write a patch & submit it to the repo for GrandPerspective? Note that I have an open ticket on this issue here.)
For my purposes, I only need MacOS information (though others may be interested in Windows / Linux).
Thanks in advance.
Thanks - but...
... interestingly, I suspect don't actually want a *Dropbox* API. We (probably, instead) want the native OS calls for file attribute detection. For performance, we likely just want you to tell us which NSFileManager (or whatever) calls & attributes we need to know in order to simply learn file attributes.
(Does that make the answer something that can be shared sooner?)
@batsonjay Thanks for clarifying! I can only help with the Dropbox API, so I'm moving this thread back over to the desktop client section as they will hopefully have more insight on the filesystem aspects here.
Hmm - I thought I replied to this; but maybe I shut my tab before I posted the reply.....
We don't need something in the Dropbox API. In fact, we just need Dropbox to indicate how to determine this via the native (MacOS) operating system calls.
Presumably Dropbox is taking advantage of specific operating system file attributes. (This can be confirmed on MacOS by using the ls -la@ command to see that remote-only files have the extended attributes com.dropbox.attributes and com.dropbox.placeholder.)
What would be helpful is a listing of all the attributes used by Dropbox, what they're used for, and how to obtain this via MacOS system calls from within an application. (For instance, there's no reason for the Grand Perspective application to actually obtain, and use, the Dropbox API. In fact, since the application is Open Source, it may - now, or in the future - run afould of Dropbox API licenses. Better to simply use MacOS system calls to determine remote / local.)
Since this is simply information that could be supplied by an appropriate Dropbox engineer, is it possible to get this info supplied here in the Forum?
@jayaons2 It looks like no one was able to offer more information on the filesystem side of this for the original conversation here, but as far as the Dropbox API is concerned, there still isn't any Smart Sync programmatic interface available, e.g., for C# or otherwise.
The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.Sound good? Let's get started.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!