SubApis.Files Class

Contains all calls to Dropbox’s API related to files and file management.

Constructors

Name Description
Files(string) Initializes a new Files class.

Properties

Name Type Description
CancellationPending System.Boolean Whether a cancellation is pending (after using Cancel() ) or not.
IsBusy System.Boolean Whether an asynchronous operation is running or not.

Methods

Name Description
Files.Cancel() Cancel the current asynchronous operation.
Files.FileExists(string) Checks whether a file exists or not.
Files.FolderExists(string) Checks whether a folder exists or not.
Files.GetMetadata(string, bool) Returns the metadata for a file or folder.
Files.ListFolder(string, bool, bool, bool) Returns the contents of a folder.
Files.ListFolderContinue(string) Once a cursor has been retrieved from ListFolder, use this to paginate through all files and retrieve updates to the folder.
Files.ListFolderGetLatestCursor(string, bool, bool, bool) A way to quickly get a cursor for the folder’s state. Unlike ListFolder, ListFolderGetLatestCursor doesn’t return any entries. This endpoint is for apps which only needs to know about new files and modifications and doesn’t need to know about files that already exist in the folder.
Files.ListFolderLongpoll(string, int) A longpoll endpoint to wait for changes on an account. In conjunction with list_folder, this call gives you a low-latency way to monitor an account for file changes. The connection will block until there are changes available or a timeout occurs.
Files.Download(string, string) Download a file from a user’s
Files.Upload(string, string, WriteMode, bool, bool, string) Create a new file with the contents provided in the request asynchronously.
Files.Search(string, string, int, int, SearchMode) Searches for files and folders.
Files.CreateFolder(string) Create a folder at a given path.
Files.Delete(string) Delete the file or folder at a given path. If the path is a folder, all its contents will be deleted too.
Files.PermanentlyDelete(string) Delete the file or folder at a given path. If the path is a folder, all its contents will be deleted too.
Files.Copy(string, string) Copy a file or folder to a different location in the user’s Dropbox. If the source path is a folder, all its contents will be copied.
Files.Move(string, string) Move a file or folder to a different location in the user’s Dropbox. If the source path is a folder, all its contents will be moved.
Files.GetThumbnail(string, string, ThumbnailFormat, ThumbnailSize) Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif and bmp. Photos that are larger than 20MB in size won’t be converted to a thumbnail.
Files.GetPreview(string, string) Get a preview for a file in PDF format. Currently previews are only generated for the files with the following extensions: .doc, .docx, .docm, .ppt, .pps, .ppsx, .ppsm, .pptx, .pptm, .xls, .xlsx, .xlsm, .rtf
Files.ListRevisions(string, int) Returns revisions of a file.
Files.Restore(string, string) Restore a file to a specific revision.