コード例 #1
0
        public async Task <bool> Upload(string folderName)
        {
            string shareName = ShareName;
            var    zip       = new FolderZip(cfg, shareName, folderName);

            OnStatusChanged("PACKAGING...");
            await zip.pack();

            var zipPath = zip.zipFile;
            var zipFile = System.IO.Path.GetFileName(zipPath);
            var share   = new S3FileShare(cfg, shareName);

            OnStatusChanged("UPLOADING...");
            var success = await share.Upload(zipFile, zipPath);

            if (success)
            {
                OnStatusChanged("SUCCESS");
            }
            else
            {
                OnStatusChanged("FAILED");
            }
            return(success);
        }
コード例 #2
0
        public IEnumerable <string> FileList(string shareName, string folderName)
        {
            var zip = new FolderZip(cfg, shareName, folderName);

            return(zip.FolderFiles(folderName));
        }