cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

Recently modified Direcories or files

Recently modified Direcories or files

rhernandez8305
Helpful | Level 6

How can I know if a directory or files has been modify before download it.

5 Replies 5

Greg-DB
Dropbox Staff

The best way to keep track of changes in folders via the API is to use the /2/files/list_folder[/continue] endpoints. By storing and re-using the latest cursor you received and calling back to /2/files/list_folder/continue when desired, you can see just what changed, if anything. The documentation for those endpoints contains more information.

 

For reference, there are corresponding native methods for those endpoints in the official SDKs, such as ListFolder and ListFolderContinue in the .NET SDK, for example.

rhernandez8305
Helpful | Level 6

Thanks for reply! I had test the functions but the cursor value change in each request, just the files' hash value is the same. With the files' hash value I know if the file changed but the dictories I don't know how do it, the directories doesn´t have hash value.

 

Thanks.

Greg-DB
Dropbox Staff
What kind of "change" for the folder are you looking for exactly? By storing and re-using the latest cursor you received, you can get any/all changes in the folder. If you want to receive changes in subfolders too, set recursive=true.

rhernandez8305
Helpful | Level 6

Did you have an example, I got a diferent cursor value in each request although the folder don´t have changes.

 

var list3 = await dbx.Files.ListFolderAsync(string.Empty);

 

first request

list3.Cursor =  AAG88yckZh...

 

second request

list3.Curso=AAHI9m7iCl...

 

never is the same cursor value.

 

Greg-DB
Dropbox Staff
You will get a different cursor each time, but the cursor itself doesn't tell you about the contents anyway. You should refer to the 'entries' list in the response to see what, if anything, changed under that folder.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    rhernandez8305 Helpful | Level 6
What do Dropbox user levels mean?