Class FilesAppRoutes
The routes for the Dropbox.Api.Files namespace
Inheritance
Inherited Members
Namespace: Dropbox.Api.Files.Routes
Assembly: Dropbox.Api.dll
Syntax
public class FilesAppRoutes
Methods
| Improve this Doc View SourceBeginGetThumbnailV2(PathOrLink, ThumbnailFormat, ThumbnailSize, ThumbnailMode, AsyncCallback, Object)
Begins an asynchronous send to the get thumbnail route.
Declaration
public IAsyncResult BeginGetThumbnailV2(PathOrLink resource, ThumbnailFormat format = null, ThumbnailSize size = null, ThumbnailMode mode = null, AsyncCallback callback = null, object callbackState = null)
Parameters
Type | Name | Description |
---|---|---|
PathOrLink | resource | Information specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path. |
ThumbnailFormat | format | The format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts. |
ThumbnailSize | size | The size for the thumbnail image. |
ThumbnailMode | mode | How to resize and crop the image to achieve the desired size. |
System.AsyncCallback | callback | The method to be called when the asynchronous send is completed. |
System.Object | callbackState | A user provided object that distinguished this send from other send requests. |
Returns
Type | Description |
---|---|
System.IAsyncResult | An object that represents the asynchronous send request. |
BeginGetThumbnailV2(ThumbnailV2Arg, AsyncCallback, Object)
Begins an asynchronous send to the get thumbnail route.
Declaration
public IAsyncResult BeginGetThumbnailV2(ThumbnailV2Arg thumbnailV2Arg, AsyncCallback callback, object state = null)
Parameters
Type | Name | Description |
---|---|---|
ThumbnailV2Arg | thumbnailV2Arg | The request parameters. |
System.AsyncCallback | callback | The method to be called when the asynchronous send is completed. |
System.Object | state | A user provided object that distinguished this send from other send requests. |
Returns
Type | Description |
---|---|
System.IAsyncResult | An object that represents the asynchronous send request. |
BeginListFolder(ListFolderArg, AsyncCallback, Object)
Begins an asynchronous send to the list folder route.
Declaration
public IAsyncResult BeginListFolder(ListFolderArg listFolderArg, AsyncCallback callback, object state = null)
Parameters
Type | Name | Description |
---|---|---|
ListFolderArg | listFolderArg | The request parameters. |
System.AsyncCallback | callback | The method to be called when the asynchronous send is completed. |
System.Object | state | A user provided object that distinguished this send from other send requests. |
Returns
Type | Description |
---|---|
System.IAsyncResult | An object that represents the asynchronous send request. |
BeginListFolder(String, Boolean, Boolean, Boolean, Boolean, Boolean, Nullable<UInt32>, SharedLink, TemplateFilterBase, Boolean, AsyncCallback, Object)
Begins an asynchronous send to the list folder route.
Declaration
public IAsyncResult BeginListFolder(string path, bool recursive = false, bool includeMediaInfo = false, bool includeDeleted = false, bool includeHasExplicitSharedMembers = false, bool includeMountedFolders = true, uint? limit = null, SharedLink sharedLink = null, TemplateFilterBase includePropertyGroups = null, bool includeNonDownloadableFiles = true, AsyncCallback callback = null, object callbackState = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | A unique identifier for the file. |
System.Boolean | recursive | If true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders. |
System.Boolean | includeMediaInfo | If true, MediaInfo is set for photo and video. This parameter will no longer have an effect starting December 2, 2019. |
System.Boolean | includeDeleted | If true, the results will include entries for files and folders that used to exist but were deleted. |
System.Boolean | includeHasExplicitSharedMembers | If true, the results will include a flag for each file indicating whether or not that file has any explicit members. |
System.Boolean | includeMountedFolders | If true, the results will include entries under mounted folders which includes app folder, shared folder and team folder. |
System.Nullable<System.UInt32> | limit | The maximum number of results to return per request. Note: This is an approximate number and there can be slightly more entries returned in some cases. |
SharedLink | sharedLink | A shared link to list the contents of. If the link is password-protected, the password must be provided. If this field is present, Path will be relative to root of the shared link. Only non-recursive mode is supported for shared link. |
TemplateFilterBase | includePropertyGroups | If set to a valid list of template IDs, PropertyGroups is set if there exists property data associated with the file and each of the listed templates. |
System.Boolean | includeNonDownloadableFiles | If true, include files that are not downloadable, i.e. Google Docs. |
System.AsyncCallback | callback | The method to be called when the asynchronous send is completed. |
System.Object | callbackState | A user provided object that distinguished this send from other send requests. |
Returns
Type | Description |
---|---|
System.IAsyncResult | An object that represents the asynchronous send request. |
BeginListFolderContinue(ListFolderContinueArg, AsyncCallback, Object)
Begins an asynchronous send to the list folder continue route.
Declaration
public IAsyncResult BeginListFolderContinue(ListFolderContinueArg listFolderContinueArg, AsyncCallback callback, object state = null)
Parameters
Type | Name | Description |
---|---|---|
ListFolderContinueArg | listFolderContinueArg | The request parameters. |
System.AsyncCallback | callback | The method to be called when the asynchronous send is completed. |
System.Object | state | A user provided object that distinguished this send from other send requests. |
Returns
Type | Description |
---|---|
System.IAsyncResult | An object that represents the asynchronous send request. |
BeginListFolderContinue(String, AsyncCallback, Object)
Begins an asynchronous send to the list folder continue route.
Declaration
public IAsyncResult BeginListFolderContinue(string cursor, AsyncCallback callback, object callbackState = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | cursor | The cursor returned by your last call to ListFolderAsync(ListFolderArg) ListFolderAsync(ListFolderArg) or ListFolderContinueAsync(ListFolderContinueArg) ListFolderContinueAsync(ListFolderContinueArg). |
System.AsyncCallback | callback | The method to be called when the asynchronous send is completed. |
System.Object | callbackState | A user provided object that distinguished this send from other send requests. |
Returns
Type | Description |
---|---|
System.IAsyncResult | An object that represents the asynchronous send request. |
EndGetThumbnailV2(IAsyncResult)
Waits for the pending asynchronous send to the get thumbnail route to complete
Declaration
public IDownloadResponse<PreviewResult> EndGetThumbnailV2(IAsyncResult asyncResult)
Parameters
Type | Name | Description |
---|---|---|
System.IAsyncResult | asyncResult | The reference to the pending asynchronous send request |
Returns
Type | Description |
---|---|
IDownloadResponse<PreviewResult> | The response to the send request |
Exceptions
Type | Condition |
---|---|
ApiException<TError> | Thrown if there is an error processing the request; This will contain a ThumbnailV2Error. |
EndListFolder(IAsyncResult)
Waits for the pending asynchronous send to the list folder route to complete
Declaration
public ListFolderResult EndListFolder(IAsyncResult asyncResult)
Parameters
Type | Name | Description |
---|---|---|
System.IAsyncResult | asyncResult | The reference to the pending asynchronous send request |
Returns
Type | Description |
---|---|
ListFolderResult | The response to the send request |
Exceptions
Type | Condition |
---|---|
ApiException<TError> | Thrown if there is an error processing the request; This will contain a ListFolderError. |
EndListFolderContinue(IAsyncResult)
Waits for the pending asynchronous send to the list folder continue route to complete
Declaration
public ListFolderResult EndListFolderContinue(IAsyncResult asyncResult)
Parameters
Type | Name | Description |
---|---|---|
System.IAsyncResult | asyncResult | The reference to the pending asynchronous send request |
Returns
Type | Description |
---|---|
ListFolderResult | The response to the send request |
Exceptions
Type | Condition |
---|---|
ApiException<TError> | Thrown if there is an error processing the request; This will contain a ListFolderContinueError. |
GetThumbnailV2Async(PathOrLink, ThumbnailFormat, ThumbnailSize, ThumbnailMode)
Get a thumbnail for an image.
This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won't be converted to a thumbnail.
Declaration
public Task<IDownloadResponse<PreviewResult>> GetThumbnailV2Async(PathOrLink resource, ThumbnailFormat format = null, ThumbnailSize size = null, ThumbnailMode mode = null)
Parameters
Type | Name | Description |
---|---|---|
PathOrLink | resource | Information specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path. |
ThumbnailFormat | format | The format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts. |
ThumbnailSize | size | The size for the thumbnail image. |
ThumbnailMode | mode | How to resize and crop the image to achieve the desired size. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IDownloadResponse<PreviewResult>> | The task that represents the asynchronous send operation. The TResult parameter contains the response from the server. |
Exceptions
Type | Condition |
---|---|
ApiException<TError> | Thrown if there is an error processing the request; This will contain a ThumbnailV2Error. |
GetThumbnailV2Async(ThumbnailV2Arg)
Get a thumbnail for an image.
This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won't be converted to a thumbnail.
Declaration
public Task<IDownloadResponse<PreviewResult>> GetThumbnailV2Async(ThumbnailV2Arg thumbnailV2Arg)
Parameters
Type | Name | Description |
---|---|---|
ThumbnailV2Arg | thumbnailV2Arg | The request parameters |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IDownloadResponse<PreviewResult>> | The task that represents the asynchronous send operation. The TResult parameter contains the response from the server. |
Exceptions
Type | Condition |
---|---|
ApiException<TError> | Thrown if there is an error processing the request; This will contain a ThumbnailV2Error. |
ListFolderAsync(ListFolderArg)
Starts returning the contents of a folder. If the result's HasMore field is true
, call
ListFolderContinueAsync(ListFolderContinueArg) ListFolderContinueAsync(ListFolderContinueArg) with the
returned Cursor to retrieve more
entries.
If you're using Recursive set
to true
to keep a local cache of the contents of a Dropbox account, iterate
through each entry in order and process them as follows to keep your local state in
sync:
For each FileMetadata, store the new entry at the given path in your local state. If the required parent folders don't exist yet, create them. If there's already something else at the given path, replace it and remove all its children.
For each FolderMetadata, store the new entry at the given path
in your local state. If the required parent folders don't exist yet, create them.
If there's already something else at the given path, replace it but leave the
children as they are. Check the new entry's
For each DeletedMetadata, if your local state has something at the given path, remove it and all its children. If there's nothing at the given path, ignore this entry.
Note: RateLimitError may be returned if multiple ListFolderAsync(ListFolderArg) ListFolderAsync(ListFolderArg) or ListFolderContinueAsync(ListFolderContinueArg) ListFolderContinueAsync(ListFolderContinueArg) calls with same parameters are made simultaneously by same API app for same user. If your app implements retry logic, please hold off the retry until the previous request finishes.
Declaration
public Task<ListFolderResult> ListFolderAsync(ListFolderArg listFolderArg)
Parameters
Type | Name | Description |
---|---|---|
ListFolderArg | listFolderArg | The request parameters |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ListFolderResult> | The task that represents the asynchronous send operation. The TResult parameter contains the response from the server. |
Exceptions
Type | Condition |
---|---|
ApiException<TError> | Thrown if there is an error processing the request; This will contain a ListFolderError. |
ListFolderAsync(String, Boolean, Boolean, Boolean, Boolean, Boolean, Nullable<UInt32>, SharedLink, TemplateFilterBase, Boolean)
Starts returning the contents of a folder. If the result's HasMore field is true
, call
ListFolderContinueAsync(ListFolderContinueArg) ListFolderContinueAsync(ListFolderContinueArg) with the
returned Cursor to retrieve more
entries.
If you're using Recursive set
to true
to keep a local cache of the contents of a Dropbox account, iterate
through each entry in order and process them as follows to keep your local state in
sync:
For each FileMetadata, store the new entry at the given path in your local state. If the required parent folders don't exist yet, create them. If there's already something else at the given path, replace it and remove all its children.
For each FolderMetadata, store the new entry at the given path
in your local state. If the required parent folders don't exist yet, create them.
If there's already something else at the given path, replace it but leave the
children as they are. Check the new entry's
For each DeletedMetadata, if your local state has something at the given path, remove it and all its children. If there's nothing at the given path, ignore this entry.
Note: RateLimitError may be returned if multiple ListFolderAsync(ListFolderArg) ListFolderAsync(ListFolderArg) or ListFolderContinueAsync(ListFolderContinueArg) ListFolderContinueAsync(ListFolderContinueArg) calls with same parameters are made simultaneously by same API app for same user. If your app implements retry logic, please hold off the retry until the previous request finishes.
Declaration
public Task<ListFolderResult> ListFolderAsync(string path, bool recursive = false, bool includeMediaInfo = false, bool includeDeleted = false, bool includeHasExplicitSharedMembers = false, bool includeMountedFolders = true, uint? limit = null, SharedLink sharedLink = null, TemplateFilterBase includePropertyGroups = null, bool includeNonDownloadableFiles = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | A unique identifier for the file. |
System.Boolean | recursive | If true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders. |
System.Boolean | includeMediaInfo | If true, MediaInfo is set for photo and video. This parameter will no longer have an effect starting December 2, 2019. |
System.Boolean | includeDeleted | If true, the results will include entries for files and folders that used to exist but were deleted. |
System.Boolean | includeHasExplicitSharedMembers | If true, the results will include a flag for each file indicating whether or not that file has any explicit members. |
System.Boolean | includeMountedFolders | If true, the results will include entries under mounted folders which includes app folder, shared folder and team folder. |
System.Nullable<System.UInt32> | limit | The maximum number of results to return per request. Note: This is an approximate number and there can be slightly more entries returned in some cases. |
SharedLink | sharedLink | A shared link to list the contents of. If the link is password-protected, the password must be provided. If this field is present, Path will be relative to root of the shared link. Only non-recursive mode is supported for shared link. |
TemplateFilterBase | includePropertyGroups | If set to a valid list of template IDs, PropertyGroups is set if there exists property data associated with the file and each of the listed templates. |
System.Boolean | includeNonDownloadableFiles | If true, include files that are not downloadable, i.e. Google Docs. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ListFolderResult> | The task that represents the asynchronous send operation. The TResult parameter contains the response from the server. |
Exceptions
Type | Condition |
---|---|
ApiException<TError> | Thrown if there is an error processing the request; This will contain a ListFolderError. |
ListFolderContinueAsync(ListFolderContinueArg)
Once a cursor has been retrieved from ListFolderAsync(ListFolderArg) ListFolderAsync(ListFolderArg), use this to paginate through all files and retrieve updates to the folder, following the same rules as documented for ListFolderAsync(ListFolderArg) ListFolderAsync(ListFolderArg).
Declaration
public Task<ListFolderResult> ListFolderContinueAsync(ListFolderContinueArg listFolderContinueArg)
Parameters
Type | Name | Description |
---|---|---|
ListFolderContinueArg | listFolderContinueArg | The request parameters |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ListFolderResult> | The task that represents the asynchronous send operation. The TResult parameter contains the response from the server. |
Exceptions
Type | Condition |
---|---|
ApiException<TError> | Thrown if there is an error processing the request; This will contain a ListFolderContinueError. |
ListFolderContinueAsync(String)
Once a cursor has been retrieved from ListFolderAsync(ListFolderArg) ListFolderAsync(ListFolderArg), use this to paginate through all files and retrieve updates to the folder, following the same rules as documented for ListFolderAsync(ListFolderArg) ListFolderAsync(ListFolderArg).
Declaration
public Task<ListFolderResult> ListFolderContinueAsync(string cursor)
Parameters
Type | Name | Description |
---|---|---|
System.String | cursor | The cursor returned by your last call to ListFolderAsync(ListFolderArg) ListFolderAsync(ListFolderArg) or ListFolderContinueAsync(ListFolderContinueArg) ListFolderContinueAsync(ListFolderContinueArg). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ListFolderResult> | The task that represents the asynchronous send operation. The TResult parameter contains the response from the server. |
Exceptions
Type | Condition |
---|---|
ApiException<TError> | Thrown if there is an error processing the request; This will contain a ListFolderContinueError. |