Get a list of Files of a Specific Folder from Aspose Cloud Storage Introduction
This API allows you to get a list of all files of a specific folder from the Aspose Cloud Storage .
API Explorer
Aspose.Storage Cloud API Reference lets you try out Get the file listing of a specific folder API right away in your browser! It allows you to effortlessly interact and try out every single operation our APIs exposes. Please check this article to learn how to get your App Key and SID.
cURL Example
SDKs
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 REST API calls and lets you use Aspose.Storage features in a native way for your preferred language.
SDK Examples
C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-dotnet
// Get App Key and App SID from https://dashboard.aspose.cloud/
var configuration = new Configuration { AppSid = "xxxxxxxx", AppKey = "xxxxxxxx" };
StorageApi storageApi = new StorageApi(configuration);
GetListFilesRequest request = new GetListFilesRequest();
request.Path = "Documents";
request.Storage = null;
var response = storageApi.GetListFiles(request);
Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxxxxx", "xxxxxxxx");
String path = "templates";
String storage = null;
FilesResponse response = api.GetListFiles(path, storage);
PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-php
<?php
require_once realpath(__DIR__ . '/..') . '/vendor/autoload.php';
use Aspose\Storage\Configuration;
use Aspose\Storage\Api\StorageApi;
use Aspose\Storage\Model\Requests;
class File {
public $storageApi;
public function __construct() {
$config = new Configuration();
// Get App Key and App SID from https://dashboard.aspose.cloud/
$config->setAppKey('')->setAppSid('');
$this->storageApi = new StorageApi($config);
}
public function getListFiles() {
$path = "Documents";
$storage = null;
$request = new Requests\GetListFilesRequest($path, $storage);
$result = $this->storageApi->getListFiles($request);
print_r($result);
}
}
$file = new File();
$file->getListFiles();
?>
Ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-ruby
require 'aspose_storage_cloud'
class Storage
include AsposeStorageCloud
def initialize
#TODO: Get your AppSID and Appkey at https://dashboard.aspose.cloud
AsposeStorageCloud.configure do |config|
config.api_key['api_key'] = ''
config.api_key['app_sid'] = ''
end
@storage_api = StorageApi.new
end
def get_list_files
path = 'Documents'
storage = nil
request = GetListFilesRequest.new(path, storage)
result = @storage_api.get_list_files(request)
end
end
storage = Storage.new()
puts storage.get_list_files
Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-python
import os
import asposestoragecloud
from asposestoragecloud.apis.storage_api import StorageApi
from asposestoragecloud.api_client import ApiClient
class File(object):
def __init__(self):
ABSPATH = os.path.abspath(os.path.realpath(os.path.dirname(__file__)) + "/..")
self.dataFolder = os.path.join(ABSPATH, "Data")
# Get App Key and App SID from https://dashboard.aspose.cloud/
self.apiClient = ApiClient(apiKey='xxxxxxxx', appSid='xxxx-xxxx-xxxx-xxxx-xxxx')
self.api = asposestoragecloud.apis.storage_api.StorageApi(self.apiClient)
def getListFiles(self):
response = self.api.get_list_files()
file = File()
file.getListFiles()