public ListFilesCallbackAsync(string bucketId, io.storj.libstorj.Storj storj) { try { storj.listFiles(bucketId, this); } catch (io.storj.libstorj.KeysNotFoundException) { throw new KeysNotFoundException(); } }
public GetFileCallbackAsync(string bucketId, string fileId, io.storj.libstorj.Storj storj) { try { storj.getFile(bucketId, fileId, this); } catch (io.storj.libstorj.KeysNotFoundException) { throw new KeysNotFoundException(); } }
/// <summary> /// Starts the deletion of a bucket. /// Throws KeysNotFoundException /// </summary> /// <param name="bucketId">The Id of the bucket to delete</param> /// <param name="storj">The storj-object</param> public DeleteBucketCallbackAsync(string bucketId, io.storj.libstorj.Storj storj) { try { storj.deleteBucket(bucketId, this); } catch (io.storj.libstorj.KeysNotFoundException) { throw new KeysNotFoundException(); } }
/// <summary> /// Starts the creation of a bucket. /// Throws KeysNotFoundException. /// </summary> /// <param name="bucketName">The name of the bucket to create</param> /// <param name="storj">The storj-object</param> public CreateBucketCallbackAsync(string bucketName, io.storj.libstorj.Storj storj) { try { storj.createBucket(bucketName, this); } catch (io.storj.libstorj.KeysNotFoundException) { throw new KeysNotFoundException(); } }
public GetBucketsCallbackAsync(io.storj.libstorj.Storj storj) { try { storj.getBuckets(this); } catch (io.storj.libstorj.KeysNotFoundException) { throw new KeysNotFoundException(); } }
public RegisterCallbackAsync(string user, string password, io.storj.libstorj.Storj storj) { storj.register(user, password, this); }
public static DownloadJob DownloadFile(string bucketId, string fileId, string localPath, io.storj.libstorj.Storj storj) { DownloadJob job = new DownloadJob(fileId); DownloadFileCallbackAsync callback = new DownloadFileCallbackAsync(job); try { var handle = storj.downloadFile(bucketId, fileId, localPath, callback); job.Id = handle; } catch (io.storj.libstorj.KeysNotFoundException) { throw new KeysNotFoundException(); } return(job); }
/// <summary> /// Creates a storj-object that connects to the given URL (as string) /// </summary> /// <param name="url">The URL to connect to</param> public Storj(string url) { _storjJava = new io.storj.libstorj.Storj(url); }
/// <summary> /// Creates a storj-object that connects to the given URL /// </summary> /// <param name="url">The URL to connect to</param> public Storj(Uri url) { _storjJava = new io.storj.libstorj.Storj(new java.net.URL(url.ToString())); }
/// <summary> /// Creates a storj-object with default connection parameters /// </summary> public Storj() { _storjJava = new io.storj.libstorj.Storj(); }
public GetChildrenCallbackAsync(File file, io.storj.libstorj.Storj storj) { storj.getChildren(new io.storj.libstorj.File(file.Id, file.BucketId, file.Name, file.Created, file.IsDecrypted, file.Size, file.MimeType, file.Erasure, file.Index, file.Hmac), this); }
public GetChildrenCallbackAsync(Bucket bucket, io.storj.libstorj.Storj storj) { storj.getChildren(new io.storj.libstorj.Bucket(bucket.Id, bucket.Name, bucket.Created, bucket.IsDecrypted), this); }
public GetInfoCallbackAsync(io.storj.libstorj.Storj storj) { storj.getInfo(this); }