Esempio n. 1
0
        public void PutFile()
        {
            string fullFileName = S3_DXW_ROOT + "/" + S3_FN1;
              S3V4URI fileUri = new S3V4URI(fullFileName);

              if (S3V4.FileExists(fileUri, S3_ACCESSKEY, S3_SECRETKEY, 0))
            S3V4.RemoveFile(fileUri, S3_ACCESSKEY, S3_SECRETKEY, 0);

              S3V4.PutFile(fileUri, S3_ACCESSKEY, S3_SECRETKEY, S3_CONTENTSTREAM1, 0);

              using (MemoryStream ms = new MemoryStream())
              {
            S3V4.GetFile(fileUri, S3_ACCESSKEY, S3_SECRETKEY, ms, 0);

            byte[] s3FileContentBytes = ms.GetBuffer();

            string s3FileContentStr = Encoding.UTF8.GetString(s3FileContentBytes, 0, (int)ms.Length);

            Assert.AreEqual(S3_CONTENTSTR1, s3FileContentStr);
              }

              S3V4.RemoveFile(fileUri, S3_ACCESSKEY, S3_SECRETKEY, 0);
        }
Esempio n. 2
0
File: S3V4.cs Progetto: zhabis/nfx
 public static void GetFile(S3V4URI uri, string accessKey, string secretKey, Stream stream, int timeoutMs)
 {
     GetFile(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, stream, timeoutMs);
 }
Esempio n. 3
0
 public static S3V4URI CreateFile(string path)
 {
   S3V4URI uri = new S3V4URI(path);
   return uri;
 }
Esempio n. 4
0
 public static S3V4URI CreateFolder(string path)
 {
   S3V4URI uri = new S3V4URI(path.ToDirectoryPath());
   return uri;
 }
Esempio n. 5
0
 public S3V4FSH(S3V4URI uri)
 {
     Uri = uri;
 }
Esempio n. 6
0
File: S3V4.cs Progetto: zhabis/nfx
 public static bool ItemExists(S3V4URI uri, string accessKey, string secretKey, int timeoutMs)
 {
     return(ItemExists(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, timeoutMs));
 }
Esempio n. 7
0
 public static void RemoveItem(S3V4URI uri, string accessKey, string secretKey, int timeoutMs)
 {
     RemoveItem(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, timeoutMs);
 }
Esempio n. 8
0
File: S3V4.cs Progetto: zhabis/nfx
 public static void RemoveItem(S3V4URI uri, string accessKey, string secretKey, int timeoutMs)
 {
     RemoveItem(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, timeoutMs);
 }
Esempio n. 9
0
 public static string PutFile(S3V4URI uri, string accessKey, string secretKey, Stream contentStream, int timeoutMs)
 {
     return PutItem(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, contentStream, timeoutMs);
 }
Esempio n. 10
0
 public static string PutFolder(S3V4URI uri, string accessKey, string secretKey, int timeoutMs)
 {
     return PutFolder( uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, timeoutMs);
 }
Esempio n. 11
0
 public static string ListBucket(S3V4URI uri, string accessKey, string secretKey, int timeoutMs,
     string prefix = null, string marker = null, int? maxKeys = null)
 {
     return ListBucket(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, timeoutMs, prefix, marker, maxKeys);
 }
Esempio n. 12
0
        public static S3V4URI CreateFile(string path)
        {
            S3V4URI uri = new S3V4URI(path);

            return(uri);
        }
Esempio n. 13
0
        public static S3V4URI CreateFolder(string path)
        {
            S3V4URI uri = new S3V4URI(path.ToDirectoryPath());

            return(uri);
        }
Esempio n. 14
0
File: S3V4.cs Progetto: zhabis/nfx
 public static string PutFolder(S3V4URI uri, string accessKey, string secretKey, int timeoutMs)
 {
     return(PutFolder(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, timeoutMs));
 }
Esempio n. 15
0
 public static bool FolderExists(S3V4URI uri, string accessKey, string secretKey, int timeoutMs)
 {
     return FileExists(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, timeoutMs);
 }
Esempio n. 16
0
File: S3V4.cs Progetto: zhabis/nfx
 public static string PutFile(S3V4URI uri, string accessKey, string secretKey, Stream contentStream, int timeoutMs)
 {
     return(PutItem(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, contentStream, timeoutMs));
 }
Esempio n. 17
0
 public static void GetFile(S3V4URI uri, string accessKey, string secretKey, Stream stream, int timeoutMs)
 {
     GetFile(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, stream, timeoutMs);
 }
Esempio n. 18
0
File: S3V4.cs Progetto: zhabis/nfx
 public static string ListBucket(S3V4URI uri, string accessKey, string secretKey, int timeoutMs,
                                 string prefix = null, string marker = null, int?maxKeys = null)
 {
     return(ListBucket(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, timeoutMs, prefix, marker, maxKeys));
 }
Esempio n. 19
0
 public static IDictionary<string, string> GetItemMetadata(S3V4URI uri, string accessKey, string secretKey, int timeoutMs)
 {
     return GetItemMetadata(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, timeoutMs);
 }
Esempio n. 20
0
File: S3V4.cs Progetto: zhabis/nfx
 public static IDictionary <string, string> GetItemMetadata(S3V4URI uri, string accessKey, string secretKey, int timeoutMs)
 {
     return(GetItemMetadata(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, timeoutMs));
 }
Esempio n. 21
0
 public S3V4FSH(S3V4URI uri)
 {
     Uri = uri;
 }