Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GoogleDriveFileSystem"/> class.
 /// </summary>
 /// <param name="service">The <see cref="GoogleDriveService"/> instance to use to access the Google Drive</param>
 /// <param name="rootFolderInfo">The <see cref="File"/> to use as root folder</param>
 /// <param name="requestFactory">A <see cref="IRequestFactory"/> used to create <see cref="IRestClient"/> and <see cref="HttpWebRequest"/> objects</param>
 public GoogleDriveFileSystem(GoogleDriveService service, File rootFolderInfo, GoogleDriveSupportFactory requestFactory)
 {
     _requestFactory = requestFactory;
     Service = service;
     RootFolderInfo = rootFolderInfo;
     Root = new GoogleDriveDirectoryEntry(this, RootFolderInfo, "/", true);
 }
 /// <inheritdoc/>
 public Task<IUnixFileSystem> Create(string userId, bool isAnonymous)
 {
     var service = new GoogleDriveService(_requestFactory);
     return Task.FromResult<IUnixFileSystem>(new GoogleDriveFileSystem(service, _rootFolder, _requestFactory));
 }