cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Learn all about apps and Dropbox integrations to make working from home easy here!

Dropbox installs & integrations

Connect your tools and content together with help from the Dropbox Community. Join a discussion or post a question of your own to get started.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there Developer Documentation for working with Smart Sync files?

Is there Developer Documentation for working with Smart Sync files?

batsonjay
Explorer | Level 4

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.

7 Replies 7

Re: Is there Developer Documentation for working with Smart Sync files?

Greg-DB
Dropboxer
Thanks for writing this up! The Dropbox API doesn't offer a way to check on the Smart Sync status of files unfortunately, but I'll pass this along as a feature request.

Re: Is there Developer Documentation for working with Smart Sync files?

batsonjay
Explorer | Level 4

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?)

Re: Is there Developer Documentation for working with Smart Sync files?

Greg-DB
Dropboxer

@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.

Re: Is there Developer Documentation for working with Smart Sync files?

batsonjay
Explorer | Level 4

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?

Re: Is there Developer Documentation for working with Smart Sync files?

Greg-DB
Dropboxer

@batsonjay Sorry, there was an issue moving this thread. I've merged it and moved it to the client section accordingly.

Re: Is there Developer Documentation for working with Smart Sync files?

jayaons2
New member | Level 2

Is smart sync with files and folder is possible in c# ?

Re: Is there Developer Documentation for working with Smart Sync files?

Greg-DB
Dropboxer

@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.

Poll
How do you get refocussed while working from home? Do you find any of these options keep you from getting distracted?
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?