This API allows you to get a list of all files of a specific folder from the specified Cloud Storage. If you do not pass storage name API will find folder in GroupDocs Cloud Storage.
Our API is completely independent of your operating system, database system or development language. You can use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone and time-consuming. Therefore, we have provided and support API SDKs in many development languages in order to make it easier to integrate with us. If you use SDK, it hides the Folder API calls and lets you use GroupDocs Cloud features in a native way for your preferred language.
usingGroupDocs.Conversion.Cloud.Sdk.Api;usingGroupDocs.Conversion.Cloud.Sdk.Client;usingGroupDocs.Conversion.Cloud.Sdk.Model.Requests;usingSystem;usingGroupDocs.Conversion.Cloud.Sdk.Model;namespaceGroupDocs.Conversion.Cloud.Examples.CSharp{// Get Files ListclassGet_Files_List{publicstaticvoidRun(stringpath){varconfiguration=newConfiguration(Common.MyAppSid,Common.MyAppKey);varapiInstance=newFolderApi(configuration);try{varrequest=newGetFilesListRequest(path,Common.MyStorage);varresponse=apiInstance.GetFilesList(request);foreach(StorageFilestorageFileinresponse.Value){Console.WriteLine("Expected response type is FilesList: "+storageFile.Path);}}catch(Exceptione){Console.WriteLine("Exception while calling FolderApi: "+e.Message);}}}}
<?phpinclude(dirname(__DIR__).'\CommonUtils.php');try{$apiInstance=CommonUtils::GetFolderApiInstance();$request=newGroupDocs\Conversion\Model\Requests\GetFilesListRequest("conversions",CommonUtils::$MyStorage);$response=$apiInstance->getFilesList($request);echo"Expected response type is FilesList.","<br />";foreach($response->getValue()as$storageFile){echo"Files: ",$storageFile->getPath(),"<br />";}}catch(Exception$e){echo"Something went wrong: ",$e->getMessage(),"\n";}?>
packageexamples.Working_With_Folder;importcom.groupdocs.cloud.conversion.api.*;importcom.groupdocs.cloud.conversion.client.ApiException;importcom.groupdocs.cloud.conversion.model.FilesList;importcom.groupdocs.cloud.conversion.model.*;importcom.groupdocs.cloud.conversion.model.requests.*;importexamples.Utils;publicclassConversion_Java_Get_Files_List{publicstaticvoidmain(String[]args){FolderApiapiInstance=newFolderApi(Utils.AppSID,Utils.AppKey);try{GetFilesListRequestrequest=newGetFilesListRequest("conversions",Utils.MYStorage);FilesListresponse=apiInstance.getFilesList(request);System.out.println("Expected response type is FilesList.");for(StorageFilestorageFile:response.getValue()){System.out.println("Files: "+storageFile.getPath());}}catch(ApiExceptione){System.err.println("Exception while calling FolderApi:");e.printStackTrace();}}}
# Load the gemrequire'groupdocs_conversion_cloud'require'common_utilities/Utils.rb'classWorking_With_Folderdefself.Conversion_Ruby_Get_Files_List()# Getting instance of the API$api=Common_Utilities.Get_FolderApi_Instance()$request=GroupDocsConversionCloud::GetFilesListRequest.new("conversions/sample.docx",$myStorage)$response=$api.get_files_list($request)puts("Expected response type is FilesList: "+($response).to_s)endend
"use strict";classConversion_Node_Get_Files_List{staticRun(){// retrieve supported file-formats
varrequest=newgroupdocs_conversion_cloud_1.GetFilesListRequest("conversions/sample.docx",myStorage);folderApi.getFilesList(request).then(function(response){console.log("Expected response type is FilesList: "+response.value.length);}).catch(function(error){console.log("Error: "+error.message);});}}module.exports=Conversion_Node_Get_Files_List;
# Import modulesimportgroupdocs_conversion_cloudfromCommon_Utilities.UtilsimportCommon_UtilitiesclassConversion_Python_Get_Files_List:@classmethoddefRun(self):# Create instance of the APIapi=Common_Utilities.Get_FolderApi_Instance()try:request=groupdocs_conversion_cloud.GetFilesListRequest("conversions\\sample.docx",Common_Utilities.myStorage)response=api.get_files_list(request)print("Expected response type is FilesList: "+str(response))exceptgroupdocs_conversion_cloud.ApiExceptionase:print("Exception while calling API: {0}".format(e.message))
packagemainimport("fmt"conversion"github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-go""github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-go-samples/config")funcGetFilesList(){path:="WordProcessing"filesList,_,err:=client.FolderApi.GetFilesList(ctx,path,nil)iferr!=nil{fmt.Printf("Failed to get files list: %v",err)}// Act & Assert
iflen(filesList.Value)==0{fmt.Printf("Expected files in directory, found none")}}
Create a New Folder
This API allows you to create a new Folder in the specified Cloud Storage. If you do not pass storage name API will create new Folder in default Cloud Storage.
Target folder’s path e.g. Folder1/Folder2/. The folders will be created recursively. Required. Can be passed as query string parameter or as part of the URL
storageName
Name of the storage. If not set, then default storage used
Our API is completely independent of your operating system, database system or development language. You can use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone and time-consuming. Therefore, we have provided and support API SDKs in many development languages in order to make it easier to integrate with us. If you use SDK, it hides the Folder API calls and lets you use GroupDocs for Cloud features in a native way for your preferred language.
usingGroupDocs.Conversion.Cloud.Sdk.Api;usingGroupDocs.Conversion.Cloud.Sdk.Client;usingGroupDocs.Conversion.Cloud.Sdk.Model.Requests;usingSystem;namespaceGroupDocs.Conversion.Cloud.Examples.CSharp{// Create FolderclassCreate_Folder{publicstaticvoidRun(){varconfiguration=newConfiguration(Common.MyAppSid,Common.MyAppKey);varapiInstance=newFolderApi(configuration);try{varrequest=newCreateFolderRequest("conversions",Common.MyStorage);apiInstance.CreateFolder(request);Console.WriteLine("Expected response type is Void: 'conversions' folder created.");}catch(Exceptione){Console.WriteLine("Exception while calling FolderApi: "+e.Message);}}}}
<?phpinclude(dirname(__DIR__).'\CommonUtils.php');try{$apiInstance=CommonUtils::GetFolderApiInstance();$request=newGroupDocs\Conversion\Model\Requests\CreateFolderRequest("conversions",CommonUtils::$MyStorage);$apiInstance->createFolder($request);echo"Expected response type is Void: 'conversions' folder created.","<br />";}catch(Exception$e){echo"Something went wrong: ",$e->getMessage(),"\n";}?>
packageexamples.Working_With_Folder;importcom.groupdocs.cloud.conversion.api.*;importcom.groupdocs.cloud.conversion.client.ApiException;importcom.groupdocs.cloud.conversion.model.requests.*;importexamples.Utils;publicclassConversion_Java_Create_Folder{publicstaticvoidmain(String[]args){FolderApiapiInstance=newFolderApi(Utils.AppSID,Utils.AppKey);try{CreateFolderRequestrequest=newCreateFolderRequest("conversions",Utils.MYStorage);apiInstance.createFolder(request);System.out.println("Expected response type is Void: 'conversions' folder created.");}catch(ApiExceptione){System.err.println("Exception while calling FolderApi:");e.printStackTrace();}}}
# Load the gemrequire'groupdocs_conversion_cloud'require'common_utilities/Utils.rb'classWorking_With_Folderdefself.Conversion_Ruby_Create_Folder()# Getting instance of the API$api=Common_Utilities.Get_FolderApi_Instance()$request=GroupDocsConversionCloud::CreateFolderRequest.new("conversions",$myStorage)$response=$api.create_folder($request)puts("Expected response type is Void: 'conversions' folder created.")endend
"use strict";classConversion_Node_Create_Folder{staticRun(){// retrieve supported file-formats
varrequest=newgroupdocs_conversion_cloud_1.CreateFolderRequest("conversions",myStorage);folderApi.createFolder(request).then(function(){console.log("Expected response type is Void: 'conversions' folder created.");}).catch(function(error){console.log("Error: "+error.message);});}}module.exports=Conversion_Node_Create_Folder;
# Import modulesimportgroupdocs_conversion_cloudfromCommon_Utilities.UtilsimportCommon_UtilitiesclassConversion_Python_Create_Folder:@classmethoddefRun(self):# Create instance of the APIapi=Common_Utilities.Get_FolderApi_Instance()try:request=groupdocs_conversion_cloud.CreateFolderRequest("conversions",Common_Utilities.myStorage)api.create_folder(request)print("Expected response type is Void: 'conversions' folder created.")exceptgroupdocs_conversion_cloud.ApiExceptionase:print("Exception while calling API: {0}".format(e.message))
packagemainimport("fmt"conversion"github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-go""github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-go-samples/config")funcCreateFolder(){// Create temp folder
_,err:=client.FolderApi.CreateFolder(ctx,"temp",nil)iferr!=nil{fmt.Printf("Failed to create temp folder: %v",err)}}
Delete a Particular Folder
This API allows you to delete a particular Folder in the specified Cloud Storage. If you do not pass storage name API will create new Folder in default Cloud Storage. To remove recursively inner folder/files you need to pass true value to recursive parameter in Request. If it is set to false and folder contains data then API throws the exception.
Our API is completely independent of your operating system, database system or development language. You can use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone and time-consuming. Therefore, we have provided and support API SDKs in many development languages in order to make it easier to integrate with us. If you use SDK, it hides the Delete Folder API calls and lets you use GroupDocs for Cloud features in a native way for your preferred language.
usingGroupDocs.Conversion.Cloud.Sdk.Api;usingGroupDocs.Conversion.Cloud.Sdk.Client;usingGroupDocs.Conversion.Cloud.Sdk.Model.Requests;usingSystem;namespaceGroupDocs.Conversion.Cloud.Examples.CSharp{// Delete FolderclassDelete_Folder{publicstaticvoidRun(){varconfiguration=newConfiguration(Common.MyAppSid,Common.MyAppKey);varapiInstance=newFolderApi(configuration);try{varrequest=newDeleteFolderRequest("conversions/conversions1",Common.MyStorage,true);apiInstance.DeleteFolder(request);Console.WriteLine("Expected response type is Void: 'conversions/conversions1' folder deleted recusrsively.");}catch(Exceptione){Console.WriteLine("Exception while calling FolderApi: "+e.Message);}}}}
<?phpinclude(dirname(__DIR__).'\CommonUtils.php');try{$apiInstance=CommonUtils::GetFolderApiInstance();$request=newGroupDocs\Conversion\Model\Requests\DeleteFolderRequest("conversions1\\conversions1",CommonUtils::$MyStorage,true);$apiInstance->deleteFolder($request);echo"Expected response type is Void: 'conversions1/conversions' folder deleted recusrsively.","<br />";}catch(Exception$e){echo"Something went wrong: ",$e->getMessage(),"\n";}?>
packageexamples.Working_With_Folder;importcom.groupdocs.cloud.conversion.api.*;importcom.groupdocs.cloud.conversion.client.ApiException;importcom.groupdocs.cloud.conversion.model.requests.*;importexamples.Utils;publicclassConversion_Java_Delete_Folder{publicstaticvoidmain(String[]args){FolderApiapiInstance=newFolderApi(Utils.AppSID,Utils.AppKey);try{DeleteFolderRequestrequest=newDeleteFolderRequest("conversions\\conversions1",Utils.MYStorage,true);apiInstance.deleteFolder(request);System.out.println("Expected response type is Void: 'conversions/conversions1' folder deleted recusrsively.");}catch(ApiExceptione){System.err.println("Exception while calling FolderApi:");e.printStackTrace();}}}
# Load the gemrequire'groupdocs_conversion_cloud'require'common_utilities/Utils.rb'classWorking_With_Folderdefself.Conversion_Ruby_Delete_Folder()# Getting instance of the API$api=Common_Utilities.Get_FolderApi_Instance()$request=GroupDocsConversionCloud::DeleteFolderRequest.new("conversions1",$myStorage,true)$response=$api.delete_folder($request)puts("Expected response type is Void: 'conversions/conversions1' folder deleted recursively.")endend
"use strict";classConversion_Node_Delete_Folder{staticRun(){// retrieve supported file-formats
varrequest=newgroupdocs_conversion_cloud_1.DeleteFolderRequest("conversions/conversions1",myStorage,true);folderApi.deleteFolder(request).then(function(){console.log("Expected response type is Void: 'conversions/conversions1' folder deleted recursively.");}).catch(function(error){console.log("Error: "+error.message);});}}module.exports=Conversion_Node_Delete_Folder;
# Import modulesimportgroupdocs_conversion_cloudfromCommon_Utilities.UtilsimportCommon_UtilitiesclassConversion_Python_Delete_Folder:@classmethoddefRun(self):# Create instance of the APIapi=Common_Utilities.Get_FolderApi_Instance()try:request=groupdocs_conversion_cloud.DeleteFolderRequest("conversions\\conversions1",Common_Utilities.myStorage,True)api.delete_folder(request)print("Expected response type is Void: 'conversions/conversions1' folder deleted recursively.")exceptgroupdocs_conversion_cloud.ApiExceptionase:print("Exception while calling API: {0}".format(e.message))
packagemainimport("fmt""github.com/antihax/optional"conversion"github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-go""github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-go-samples/config")funcDeleteFolder(){opts:=&conversion.FolderApiDeleteFolderOpts{Recursive:optional.NewBool(true),}_,err=client.FolderApi.DeleteFolder(ctx,"temp",opts)iferr!=nil{fmt.Printf("Failed to delete temp folder: %v",err)}}
Copy Specific Folder
This API allows you to copy a Folder to another location in the GroupDocs Cloud Storage. If you do not pass source and destination storage names API will copy Folder within default Cloud Storage.
Our API is completely independent of your operating system, database system or development language. You can use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone and time-consuming. Therefore, we have provided and support API SDKs in many development languages in order to make it easier to integrate with us. If you use SDK, it hides the Copy Folder API calls and lets you use GroupDocs Cloud features in a native way for your preferred language.
usingGroupDocs.Conversion.Cloud.Sdk.Api;usingGroupDocs.Conversion.Cloud.Sdk.Client;usingGroupDocs.Conversion.Cloud.Sdk.Model.Requests;usingSystem;namespaceGroupDocs.Conversion.Cloud.Examples.CSharp{// Copy FolderclassCopy_Folder{publicstaticvoidRun(){varconfiguration=newConfiguration(Common.MyAppSid,Common.MyAppKey);varapiInstance=newFolderApi(configuration);try{varrequest=newCopyFolderRequest("conversions","conversions1",Common.MyStorage,Common.MyStorage);apiInstance.CopyFolder(request);Console.WriteLine("Expected response type is Void: 'conversions' folder copied as 'conversions1'.");}catch(Exceptione){Console.WriteLine("Exception while calling FolderApi: "+e.Message);}}}}
<?phpinclude(dirname(__DIR__).'\CommonUtils.php');try{$apiInstance=CommonUtils::GetFolderApiInstance();$request=newGroupDocs\Conversion\Model\Requests\CopyFolderRequest("conversions","conversions1",CommonUtils::$MyStorage,CommonUtils::$MyStorage);$apiInstance->copyFolder($request);echo"Expected response type is Void: 'conversions' folder copied as 'conversions1'.","<br />";}catch(Exception$e){echo"Something went wrong: ",$e->getMessage(),"\n";}?>
packageexamples.Working_With_Folder;importcom.groupdocs.cloud.conversion.api.*;importcom.groupdocs.cloud.conversion.client.ApiException;importcom.groupdocs.cloud.conversion.model.requests.*;importexamples.Utils;publicclassConversion_Java_Copy_Folder{publicstaticvoidmain(String[]args){FolderApiapiInstance=newFolderApi(Utils.AppSID,Utils.AppKey);try{CopyFolderRequestrequest=newCopyFolderRequest("conversions","conversions1",Utils.MYStorage,Utils.MYStorage);apiInstance.copyFolder(request);System.out.println("Expected response type is Void: 'conversions' folder copied as 'conversions1'.");}catch(ApiExceptione){System.err.println("Exception while calling FolderApi:");e.printStackTrace();}}}
# Load the gemrequire'groupdocs_conversion_cloud'require'common_utilities/Utils.rb'classWorking_With_Folderdefself.Conversion_Ruby_Copy_Folder()# Getting instance of the API$api=Common_Utilities.Get_FolderApi_Instance()$request=GroupDocsConversionCloud::CopyFolderRequest.new("conversions","conversions1",$myStorage,$myStorage)$response=$api.copy_folder($request)puts("Expected response type is Void: 'conversions' folder copied as 'conversions1'.")endend
"use strict";classConversion_Node_Copy_Folder{staticRun(){// retrieve supported file-formats
varrequest=newgroupdocs_conversion_cloud_1.CopyFolderRequest("conversions","conversions1",myStorage,myStorage);folderApi.copyFolder(request).then(function(){console.log("Expected response type is Void: 'conversions' folder copied as 'conversions1'.");}).catch(function(error){console.log("Error: "+error.message);});}}module.exports=Conversion_Node_Copy_Folder;
# Import modulesimportgroupdocs_conversion_cloudfromCommon_Utilities.UtilsimportCommon_UtilitiesclassConversion_Python_Copy_Folder:@classmethoddefRun(self):# Create instance of the APIapi=Common_Utilities.Get_FolderApi_Instance()try:request=groupdocs_conversion_cloud.CopyFolderRequest("conversions","conversions1",Common_Utilities.myStorage,Common_Utilities.myStorage)api.copy_folder(request)print("Expected response type is Void: 'conversions' folder copied as 'conversions1'.")exceptgroupdocs_conversion_cloud.ApiExceptionase:print("Exception while calling API: {0}".format(e.message))
packagemainimport("fmt"conversion"github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-go""github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-go-samples/config")funcCopyFolder(){_,err=client.FolderApi.CopyFolder(ctx,"temp","temp1",nil)iferr!=nil{t.Errorf("Failed to copy folder: %v",err)}}
Move a Specific Folder
This API allows you to move a Folder to another location in the GroupDocs Cloud Storage. If you do not pass source and destination storage names API will move Folder within default Cloud Storage.
Our API is completely independent of your operating system, database system or development language. You can use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone and time-consuming. Therefore, we have provided and support API SDKs in many development languages in order to make it easier to integrate with us. If you use SDK, it hides the Move Folder API calls and lets you use GroupDocs Cloud features in a native way for your preferred language.
usingGroupDocs.Conversion.Cloud.Sdk.Api;usingGroupDocs.Conversion.Cloud.Sdk.Client;usingGroupDocs.Conversion.Cloud.Sdk.Model.Requests;usingSystem;namespaceGroupDocs.Conversion.Cloud.Examples.CSharp{// Move FolderclassMove_Folder{publicstaticvoidRun(){varconfiguration=newConfiguration(Common.MyAppSid,Common.MyAppKey);varapiInstance=newFolderApi(configuration);try{varrequest=newMoveFolderRequest("conversions1","conversions/conversions1",Common.MyStorage,Common.MyStorage);apiInstance.MoveFolder(request);Console.WriteLine("Expected response type is Void: 'conversions1' folder moved to 'conversions/conversions1'.");}catch(Exceptione){Console.WriteLine("Exception while calling FolderApi: "+e.Message);}}}}
<?phpinclude(dirname(__DIR__).'\CommonUtils.php');try{$apiInstance=CommonUtils::GetFolderApiInstance();$request=newGroupDocs\Conversion\Model\Requests\MoveFolderRequest("conversions1","conversions1\\conversions1",CommonUtils::$MyStorage,CommonUtils::$MyStorage,true);$apiInstance->moveFolder($request);echo"Expected response type is Void: 'conversions1' folder moved to 'conversions/conversions1'.","<br />";}catch(Exception$e){echo"Something went wrong: ",$e->getMessage(),"\n";}?>
packageexamples.Working_With_Folder;importcom.groupdocs.cloud.conversion.api.*;importcom.groupdocs.cloud.conversion.client.ApiException;importcom.groupdocs.cloud.conversion.model.requests.*;importexamples.Utils;publicclassConversion_Java_Move_Folder{publicstaticvoidmain(String[]args){FolderApiapiInstance=newFolderApi(Utils.AppSID,Utils.AppKey);try{MoveFolderRequestrequest=newMoveFolderRequest("conversions1","conversions\\conversions1",Utils.MYStorage,Utils.MYStorage);apiInstance.moveFolder(request);System.out.println("Expected response type is Void: 'conversions1' folder moved to 'conversions/conversions1'.");}catch(ApiExceptione){System.err.println("Exception while calling FolderApi:");e.printStackTrace();}}}
# Load the gemrequire'groupdocs_conversion_cloud'require'common_utilities/Utils.rb'classWorking_With_Folderdefself.Conversion_Ruby_Move_Folder()# Getting instance of the API$api=Common_Utilities.Get_FolderApi_Instance()$request=GroupDocsConversionCloud::MoveFolderRequest.new("conversions1","conversions/conversions1",$myStorage,$myStorage)$response=$api.move_folder($request)puts("Expected response type is Void: 'conversions1' folder moved to 'conversions/conversions1'.")endend
"use strict";classConversion_Node_Move_Folder{staticRun(){// retrieve supported file-formats
varrequest=newgroupdocs_conversion_cloud_1.MoveFolderRequest("conversions1","conversions/conversions1",myStorage,myStorage);folderApi.moveFolder(request).then(function(){console.log("Expected response type is Void: 'conversions1' folder moved to 'conversions/conversions1'.");}).catch(function(error){console.log("Error: "+error.message);});}}module.exports=Conversion_Node_Move_Folder;
# Import modulesimportgroupdocs_conversion_cloudfromCommon_Utilities.UtilsimportCommon_UtilitiesclassConversion_Python_Move_Folder:@classmethoddefRun(self):# Create instance of the APIapi=Common_Utilities.Get_FolderApi_Instance()try:request=groupdocs_conversion_cloud.MoveFolderRequest("conversions1","conversions1\\conversions",Common_Utilities.myStorage,Common_Utilities.myStorage)api.move_folder(request)print("Expected response type is Void: 'conversions1' folder moved to 'conversions/conversions1'.")exceptgroupdocs_conversion_cloud.ApiExceptionase:print("Exception while calling API: {0}".format(e.message))
packagemainimport("fmt"conversion"github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-go""github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-go-samples/config")funcMoveFolder(){_,err=client.FolderApi.MoveFolder(ctx,"temp1","temp2",nil)iferr!=nil{t.Errorf("Failed to move folder: %v",err)}}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.