Esempio n. 1
0
        private void RemoveTempFiles()
        {
            //if (Directory.Exists(Path.Combine(GetTestDataPath(), "cache")))
            //    Directory.Delete(Path.Combine(GetTestDataPath(), "cache"), true);

            //if (Directory.Exists(Path.Combine(GetTestDataPath(), "tests")))
            //    Directory.Delete(Path.Combine(GetTestDataPath(), "tests"), true);

            StorageApi.DeleteFolder("cache");
            StorageApi.DeleteFolder("tests");
        }
        private void DeleteFolder(string storageName, string path)
        {
            var request = new DeleteFolderRequest();

            request.Path      = path;
            request.Storage   = storageName;
            request.Recursive = true;
            var response = StorageApi.DeleteFolder(request);

            Assert.AreEqual(200, response.Code);
        }
Esempio n. 3
0
        public void TestDeleteFolder()
        {
            string Path      = "testfolder";
            string storage   = null;
            bool   recursive = false;

            target.PutCreateFolder(Path, null, null);

            Com.Aspose.Storage.Model.RemoveFolderResponse actual;
            actual = target.DeleteFolder(Path, storage, recursive);
            Assert.AreEqual("200", actual.Code);
        }
        public void Clean()
        {
            var request = new DeleteFolderRequest()
            {
                Path      = TempFolderPath,
                Storage   = StorageName,
                Recursive = true
            };
            var response = StorageApi.DeleteFolder(request);

            Assert.AreEqual(200, response.Code);
        }
        public static void Run()
        {
            // ExStart:1
            StorageApi storageApi  = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);
            string     Path        = "testfolder";
            string     storage     = "MyStorageName";
            string     destStorage = null;
            bool       recursive   = false;

            try
            {
                // Invoke Aspose.Storage Cloud SDK API to create and delete folder
                storageApi.PutCreateFolder(Path, storage, destStorage);
                storageApi.DeleteFolder(Path, storage, recursive);
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);
            }
            // ExEnd:1
        }
Esempio n. 6
0
 private void RemoveTempFiles()
 {
     StorageApi.DeleteFolder("cache");
     StorageApi.DeleteFolder("tests");
 }