예제 #1
0
파일: S3V4Tests.cs 프로젝트: vlapchenko/nfx
        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);
        }
예제 #2
0
파일: S3V4.cs 프로젝트: 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);
 }
예제 #3
0
파일: S3V4URI.cs 프로젝트: vlapchenko/nfx
 public static S3V4URI CreateFile(string path)
 {
   S3V4URI uri = new S3V4URI(path);
   return uri;
 }
예제 #4
0
파일: S3V4URI.cs 프로젝트: vlapchenko/nfx
 public static S3V4URI CreateFolder(string path)
 {
   S3V4URI uri = new S3V4URI(path.ToDirectoryPath());
   return uri;
 }
예제 #5
0
 public S3V4FSH(S3V4URI uri)
 {
     Uri = uri;
 }
예제 #6
0
파일: S3V4.cs 프로젝트: 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));
 }
예제 #7
0
파일: S3V4.cs 프로젝트: itadapter/nfx
 public static void RemoveItem(S3V4URI uri, string accessKey, string secretKey, int timeoutMs)
 {
     RemoveItem(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, timeoutMs);
 }
예제 #8
0
파일: S3V4.cs 프로젝트: zhabis/nfx
 public static void RemoveItem(S3V4URI uri, string accessKey, string secretKey, int timeoutMs)
 {
     RemoveItem(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, timeoutMs);
 }
예제 #9
0
파일: S3V4.cs 프로젝트: itadapter/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);
 }
예제 #10
0
파일: S3V4.cs 프로젝트: itadapter/nfx
 public static string PutFolder(S3V4URI uri, string accessKey, string secretKey, int timeoutMs)
 {
     return PutFolder( uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, timeoutMs);
 }
예제 #11
0
파일: S3V4.cs 프로젝트: itadapter/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);
 }
예제 #12
0
        public static S3V4URI CreateFile(string path)
        {
            S3V4URI uri = new S3V4URI(path);

            return(uri);
        }
예제 #13
0
        public static S3V4URI CreateFolder(string path)
        {
            S3V4URI uri = new S3V4URI(path.ToDirectoryPath());

            return(uri);
        }
예제 #14
0
파일: S3V4.cs 프로젝트: 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));
 }
예제 #15
0
파일: S3V4.cs 프로젝트: itadapter/nfx
 public static bool FolderExists(S3V4URI uri, string accessKey, string secretKey, int timeoutMs)
 {
     return FileExists(uri.LocalPath, accessKey, secretKey, uri.Bucket, uri.Region, timeoutMs);
 }
예제 #16
0
파일: S3V4.cs 프로젝트: 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));
 }
예제 #17
0
파일: S3V4.cs 프로젝트: itadapter/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);
 }
예제 #18
0
파일: S3V4.cs 프로젝트: 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));
 }
예제 #19
0
파일: S3V4.cs 프로젝트: itadapter/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);
 }
예제 #20
0
파일: S3V4.cs 프로젝트: 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));
 }
예제 #21
0
 public S3V4FSH(S3V4URI uri)
 {
     Uri = uri;
 }