Dropbox .NET SDK
Show / Hide Table of Contents

Class FilesAppRoutes

The routes for the Dropbox.Api.Files namespace

Inheritance
object
FilesAppRoutes
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Dropbox.Api.Files.Routes
Assembly: Dropbox.Api.dll
Syntax
public class FilesAppRoutes

Methods

View Source

BeginGetThumbnailV2(PathOrLink, ThumbnailFormat, ThumbnailSize, ThumbnailMode, ThumbnailQuality, bool?, 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, ThumbnailQuality quality = null, bool? excludeMediaInfo = 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), png, or webp. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts, and web for compression.

ThumbnailSize size

The size for the thumbnail image.

ThumbnailMode mode

How to resize and crop the image to achieve the desired size.

ThumbnailQuality quality

Field is only returned for "internal" callers. Quality of the thumbnail image.

bool? excludeMediaInfo

Normally, MediaInfo is set for photo and video. When this flag is true, MediaInfo is not populated. This improves latency for use cases where media_info is not needed.

AsyncCallback callback

The method to be called when the asynchronous send is completed.

object callbackState

A user provided object that distinguished this send from other send requests.

Returns
Type Description
IAsyncResult

An object that represents the asynchronous send request.

View Source

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.

AsyncCallback callback

The method to be called when the asynchronous send is completed.

object state

A user provided object that distinguished this send from other send requests.

Returns
Type Description
IAsyncResult

An object that represents the asynchronous send request.

View Source

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.

AsyncCallback callback

The method to be called when the asynchronous send is completed.

object state

A user provided object that distinguished this send from other send requests.

Returns
Type Description
IAsyncResult

An object that represents the asynchronous send request.

View Source

BeginListFolder(string, bool, bool, bool, bool, bool, uint?, SharedLink, TemplateFilterBase, bool, bool, 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, bool includeRestorableInfo = false, AsyncCallback callback = null, object callbackState = null)
Parameters
Type Name Description
string path

A unique identifier for the file.

bool recursive

If true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders. In some cases, setting Recursive to true may lead to performance issues or errors, especially when traversing folder structures with a large number of items. A workaround for such cases is to set Recursive to false and traverse subfolders one at a time.

bool includeMediaInfo

Field is deprecated. If true, MediaInfo is set for photo and video. This parameter will no longer have an effect starting December 2, 2019.

bool includeDeleted

If true, the results will include entries for files and folders that used to exist but were deleted.

bool includeHasExplicitSharedMembers

If true, the results will include a flag for each file indicating whether or not that file has any explicit members.

bool includeMountedFolders

If true, the results will include entries under mounted folders which includes app folder, shared folder and team folder.

uint? 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.

bool includeNonDownloadableFiles

If true, include files that are not downloadable, i.e. Google Docs.

bool includeRestorableInfo

If true, each returned deleted entry will include whether that entry can be restored.

AsyncCallback callback

The method to be called when the asynchronous send is completed.

object callbackState

A user provided object that distinguished this send from other send requests.

Returns
Type Description
IAsyncResult

An object that represents the asynchronous send request.

View Source

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.

AsyncCallback callback

The method to be called when the asynchronous send is completed.

object state

A user provided object that distinguished this send from other send requests.

Returns
Type Description
IAsyncResult

An object that represents the asynchronous send request.

View Source

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
string cursor

The cursor returned by your last call to ListFolderAsync(ListFolderArg) ListFolderAsync(ListFolderArg) or ListFolderContinueAsync(ListFolderContinueArg) ListFolderContinueAsync(ListFolderContinueArg).

AsyncCallback callback

The method to be called when the asynchronous send is completed.

object callbackState

A user provided object that distinguished this send from other send requests.

Returns
Type Description
IAsyncResult

An object that represents the asynchronous send request.

View Source

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

View Source

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

View Source

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

View Source

GetThumbnailV2Async(PathOrLink, ThumbnailFormat, ThumbnailSize, ThumbnailMode, ThumbnailQuality, bool?)

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, ThumbnailQuality quality = null, bool? excludeMediaInfo = 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), png, or webp. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts, and web for compression.

ThumbnailSize size

The size for the thumbnail image.

ThumbnailMode mode

How to resize and crop the image to achieve the desired size.

ThumbnailQuality quality

Field is only returned for "internal" callers. Quality of the thumbnail image.

bool? excludeMediaInfo

Normally, MediaInfo is set for photo and video. When this flag is true, MediaInfo is not populated. This improves latency for use cases where media_info is not needed.

Returns
Type Description
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.

View Source

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

View Source

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 ListFolderResult.cursor to retrieve more entries. If you're using ListFolderArg.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 FolderSharingInfo.read_only and set all its children's read-only statuses to match. 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: auth.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
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.

View Source

ListFolderAsync(string, bool, bool, bool, bool, bool, uint?, SharedLink, TemplateFilterBase, bool, bool)

Starts returning the contents of a folder. If the result's HasMore field is true, call ListFolderContinueAsync(ListFolderContinueArg) ListFolderContinueAsync(ListFolderContinueArg) with the returned ListFolderResult.cursor to retrieve more entries. If you're using ListFolderArg.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 FolderSharingInfo.read_only and set all its children's read-only statuses to match. 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: auth.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, bool includeRestorableInfo = false)
Parameters
Type Name Description
string path

A unique identifier for the file.

bool recursive

If true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders. In some cases, setting Recursive to true may lead to performance issues or errors, especially when traversing folder structures with a large number of items. A workaround for such cases is to set Recursive to false and traverse subfolders one at a time.

bool includeMediaInfo

Field is deprecated. If true, MediaInfo is set for photo and video. This parameter will no longer have an effect starting December 2, 2019.

bool includeDeleted

If true, the results will include entries for files and folders that used to exist but were deleted.

bool includeHasExplicitSharedMembers

If true, the results will include a flag for each file indicating whether or not that file has any explicit members.

bool includeMountedFolders

If true, the results will include entries under mounted folders which includes app folder, shared folder and team folder.

uint? 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.

bool includeNonDownloadableFiles

If true, include files that are not downloadable, i.e. Google Docs.

bool includeRestorableInfo

If true, each returned deleted entry will include whether that entry can be restored.

Returns
Type Description
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.

View Source

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

View Source

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
string cursor

The cursor returned by your last call to ListFolderAsync(ListFolderArg) ListFolderAsync(ListFolderArg) or ListFolderContinueAsync(ListFolderContinueArg) ListFolderContinueAsync(ListFolderContinueArg).

Returns
Type Description
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.

  • View Source
In this article
Back to top Dropbox .NET SDK