Esempio n. 1
0
        //

        public CloudObject(Dropbox.Api.Files.Metadata db, string father)
        {
            Name                 = db.Name;
            isDrive              = false;
            isDropbox            = true;
            AsDeleted            = db.AsDeleted;
            AsFile               = db.AsFile;
            AsFolder             = db.AsFolder;
            IsDeleted            = db.IsDeleted;
            IsFile               = db.IsFile;
            IsFolder             = db.IsFolder;
            ParentSharedFolderId = db.ParentSharedFolderId;
            PathDisplay          = db.PathDisplay;
            PathLower            = db.PathLower;
            Father               = father;
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of FileStructure class. Converts from DropboxFile into FileStructure.
 /// </summary>
 /// <param name="file">A Dropbox API's type of file.</param>
 public FileStructure(Dropbox.Api.Files.Metadata file)
 {
     IsFile = file.IsFile;
     if (IsFile)
     {
         Dropbox.Api.Files.FileMetadata fileMetadata = file.AsFile;
         Id               = fileMetadata.Id;
         Name             = fileMetadata.Name;
         Size             = (long)fileMetadata.Size;
         FileExtension    = Name.Substring(Name.LastIndexOf('.') + 1);
         ModifiedByMeTime = fileMetadata.ClientModified;
         Path             = fileMetadata.PathDisplay;
     }
     else
     {
         Dropbox.Api.Files.FolderMetadata folderMetadata = file.AsFolder;
         Id   = folderMetadata.Id;
         Name = folderMetadata.Name;
         Path = folderMetadata.PathDisplay;
     }
     Parents   = new List <string>();
     IsInRoot  = false;
     IsTrashed = false;
 }