/// <summary>
        /// Gets file or folder metadata (file size, creation time, extension etc.).
        /// </summary>
        /// <param name="svcUri">Dropbox URI for the file or folder</param>
        /// <returns>File or folder metadata</returns>
        public async Task <dropboxApi.Files.Metadata> GetFileOrFolderMetadata(string svcUri)
        {
            try
            {
                dropboxApi.Files.Metadata result = null;

                using (var client = new dropboxApi.DropboxClient(AccessToken))
                {
                    result = await client.Files.GetMetadataAsync(svcUri);
                }

                return(result);
            }
            catch (Exception)
            {
                return(null);
            }
        }
Beispiel #2
0
 /// <summary>
 /// <para>Initializes a new instance of the <see cref="Metadata" /> class.</para>
 /// </summary>
 /// <param name="value">The value</param>
 public Metadata(global::Dropbox.Api.Files.Metadata value)
 {
     this.Value = value;
 }