Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BackgroundUpload"/> class.
 /// </summary>
 /// <param name="fullPath">The full path to this item</param>
 /// <param name="file">The file to upload to</param>
 /// <param name="tempData">The temporary data used to read from</param>
 /// <param name="fileSystem">The file system that initiated this background upload</param>
 public BackgroundUpload([NotNull] string fullPath, [NotNull] File file, [NotNull] ITemporaryData tempData, [NotNull] GoogleDriveFileSystem fileSystem)
 {
     TransferId  = fullPath;
     File        = file;
     _tempData   = tempData;
     _fileSystem = fileSystem;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BackgroundUpload"/> class.
 /// </summary>
 /// <param name="fullPath">The full path to this item</param>
 /// <param name="file">The file to upload to</param>
 /// <param name="tempData">The temporary data used to read from</param>
 /// <param name="fileSystem">The file system that initiated this background upload</param>
 public BackgroundUpload([NotNull] string fullPath, [NotNull] File file, [NotNull] ITemporaryData tempData, [NotNull] GoogleDriveFileSystem fileSystem)
 {
     TransferId = fullPath;
     File = file;
     _tempData = tempData;
     _fileSystem = fileSystem;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GoogleDriveFileEntry"/> class.
 /// </summary>
 /// <param name="fileSystem">The file system this entry belongs to</param>
 /// <param name="file">The underlying model</param>
 /// <param name="fullName">The full path and file name of this entry</param>
 /// <param name="fileSize">The file size (if it differs from the one in the model)</param>
 public GoogleDriveFileEntry([NotNull] GoogleDriveFileSystem fileSystem, [NotNull] File file, [NotNull] string fullName, long?fileSize = null)
 {
     FileSystem  = fileSystem;
     File        = file;
     Permissions = new GenericUnixPermissions(
         new GenericAccessMode(true, true, false),
         new GenericAccessMode(true, true, false),
         new GenericAccessMode(true, true, false));
     FullName = fullName;
     Size     = fileSize ?? file.FileSize ?? 0;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GoogleDriveDirectoryEntry"/> class.
 /// </summary>
 /// <param name="fileSystem">The file system this instance belongs to</param>
 /// <param name="file">The directory this entry belongs to</param>
 /// <param name="fullPath">The full path</param>
 /// <param name="isRoot">Is this a root directory?</param>
 public GoogleDriveDirectoryEntry([NotNull] GoogleDriveFileSystem fileSystem, [NotNull] File file, [NotNull] string fullPath, bool isRoot = false)
 {
     FileSystem  = fileSystem;
     File        = file;
     Permissions = new GenericUnixPermissions(
         new GenericAccessMode(true, true, true),
         new GenericAccessMode(true, true, true),
         new GenericAccessMode(true, true, true));
     FullName = fullPath;
     IsRoot   = isRoot;
     Name     = File.Title;
 }