Class TemplateFolderAndFileClient
Inheritance
Implements
Namespace: FastReport.Cloud.Client
Assembly: FastReport.Cloud.SDK.dll
Syntax
public class TemplateFolderAndFileClient : object, ITemplateFolderAndFileClient
Constructors
TemplateFolderAndFileClient(System.Net.Http.HttpClient)
Declaration
public TemplateFolderAndFileClient(System.Net.Http.HttpClient httpClient)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpClient | httpClient |
Properties
JsonSerializerSettings
Declaration
protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
Type | Description |
---|---|
Newtonsoft.Json.JsonSerializerSettings |
PrepareRequestCallback
Declaration
public Action<System.Net.Http.HttpClient, System.Net.Http.HttpRequestMessage, string> PrepareRequestCallback { get; set; }
Property Value
Type | Description |
---|---|
Action<System.Net.Http.HttpClient, System.Net.Http.HttpRequestMessage, System.String> |
ReadResponseAsString
Declaration
public bool ReadResponseAsString { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
ClearRecycleBin(String)
Delete all folders and files from recycle bin
Declaration
public virtual void ClearRecycleBin(string subscriptionId)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | subscription id |
Remarks
User with a Delete RecycleBin permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
ClearRecycleBinAsync(String, System.Threading.CancellationToken)
Delete all folders and files from recycle bin
Declaration
public virtual async System.Threading.Tasks.Task ClearRecycleBinAsync(string subscriptionId, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | subscription id |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | All folders and files in bin have been deleted |
Remarks
User with a Delete RecycleBin permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
CopyFiles(String, SelectedFilesVM)
Copy folders and files to a specified folder
Declaration
public virtual void CopyFiles(string subscriptionId, SelectedFilesVM body = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | id of current subscription |
SelectedFilesVM | body | VM with files' ids and params of their destination |
Remarks
User with a Get permission for a files and Create permission for a destination folder can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
CopyFilesAsync(String, SelectedFilesVM, System.Threading.CancellationToken)
Copy folders and files to a specified folder
Declaration
public virtual async System.Threading.Tasks.Task CopyFilesAsync(string subscriptionId, SelectedFilesVM body = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | id of current subscription |
SelectedFilesVM | body | VM with files' ids and params of their destination |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | All folders and files have been copied |
Remarks
User with a Get permission for a files and Create permission for a destination folder can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
CountRecycleBinFoldersAndFiles(String, String, Nullable<Boolean>)
Count all folders and files from recycle bin
Declaration
public virtual CountVM CountRecycleBinFoldersAndFiles(string subscriptionId, string searchPattern = null, bool? useRegex = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | subscription id |
System.String | searchPattern | |
System.Nullable<System.Boolean> | useRegex |
Returns
Type | Description |
---|---|
CountVM | Returns list of the files from a specified folder |
Remarks
User with a Get DeletedFiles permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
CountRecycleBinFoldersAndFilesAsync(String, String, Nullable<Boolean>, System.Threading.CancellationToken)
Count all folders and files from recycle bin
Declaration
public virtual async System.Threading.Tasks.Task<CountVM> CountRecycleBinFoldersAndFilesAsync(string subscriptionId, string searchPattern = null, bool? useRegex = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | subscription id |
System.String | searchPattern | |
System.Nullable<System.Boolean> | useRegex | |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<CountVM> | Returns list of the files from a specified folder |
Remarks
User with a Get DeletedFiles permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
DeleteFiles(String, SelectedFilesVM)
Delete folders and files
Declaration
public virtual void DeleteFiles(string subscriptionId, SelectedFilesVM body = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | id of current subscription |
SelectedFilesVM | body | VM with files' ids and params of their destination |
Remarks
User with a Delete permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
DeleteFilesAsync(String, SelectedFilesVM, System.Threading.CancellationToken)
Delete folders and files
Declaration
public virtual async System.Threading.Tasks.Task DeleteFilesAsync(string subscriptionId, SelectedFilesVM body = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | id of current subscription |
SelectedFilesVM | body | VM with files' ids and params of their destination |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | All folders and files have been deleted |
Remarks
User with a Delete permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetCount(String, String, Nullable<Boolean>)
Get count of files and folders what contains in a specified folder
Declaration
public virtual CountVM GetCount(string id, string searchPattern = null, bool? useRegex = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | folder id |
System.String | searchPattern | string, that must be incuded in file or folder name to be counted <br />
|
System.Nullable<System.Boolean> | useRegex | set this to true if you want to use regular expression to search |
Returns
Type | Description |
---|---|
CountVM | Returns count of the files in a specified folder |
Remarks
User with a Get Count permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetCountAsync(String, String, Nullable<Boolean>, System.Threading.CancellationToken)
Get count of files and folders what contains in a specified folder
Declaration
public virtual async System.Threading.Tasks.Task<CountVM> GetCountAsync(string id, string searchPattern = null, bool? useRegex = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | folder id |
System.String | searchPattern | string, that must be incuded in file or folder name to be counted <br />
|
System.Nullable<System.Boolean> | useRegex | set this to true if you want to use regular expression to search |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<CountVM> | Returns count of the files in a specified folder |
Remarks
User with a Get Count permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetFoldersAndFiles(String, Nullable<Int32>, Nullable<Int32>, Nullable<FileSorting>, Nullable<Boolean>, String, Nullable<Boolean>)
Get all folders and files from specified folder
Declaration
public virtual FilesVM GetFoldersAndFiles(string id, int? skip = null, int? take = null, FileSorting? orderBy = null, bool? desc = null, string searchPattern = null, bool? useRegex = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | folder id |
System.Nullable<System.Int32> | skip | number of folder and files, that have to be skipped |
System.Nullable<System.Int32> | take | number of folder and files, that have to be returned |
System.Nullable<FileSorting> | orderBy | indicates a field to sort by |
System.Nullable<System.Boolean> | desc | indicates if sorting is descending |
System.String | searchPattern | |
System.Nullable<System.Boolean> | useRegex |
Returns
Type | Description |
---|---|
FilesVM | Returns list of the files from a specified folder |
Remarks
User with a Get Entity permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetFoldersAndFilesAsync(String, Nullable<Int32>, Nullable<Int32>, Nullable<FileSorting>, Nullable<Boolean>, String, Nullable<Boolean>, System.Threading.CancellationToken)
Get all folders and files from specified folder
Declaration
public virtual async System.Threading.Tasks.Task<FilesVM> GetFoldersAndFilesAsync(string id, int? skip = null, int? take = null, FileSorting? orderBy = null, bool? desc = null, string searchPattern = null, bool? useRegex = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | folder id |
System.Nullable<System.Int32> | skip | number of folder and files, that have to be skipped |
System.Nullable<System.Int32> | take | number of folder and files, that have to be returned |
System.Nullable<FileSorting> | orderBy | indicates a field to sort by |
System.Nullable<System.Boolean> | desc | indicates if sorting is descending |
System.String | searchPattern | |
System.Nullable<System.Boolean> | useRegex | |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<FilesVM> | Returns list of the files from a specified folder |
Remarks
User with a Get Entity permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetRecycleBinFoldersAndFiles(String, Nullable<Int32>, Nullable<Int32>, Nullable<FileSorting>, Nullable<Boolean>, String, Nullable<Boolean>)
Get all folders and files from recycle bin
Declaration
public virtual FilesVM GetRecycleBinFoldersAndFiles(string subscriptionId, int? skip = null, int? take = null, FileSorting? orderBy = null, bool? desc = null, string searchPattern = null, bool? useRegex = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | subscription id |
System.Nullable<System.Int32> | skip | number of folder and files, that have to be skipped |
System.Nullable<System.Int32> | take | number of folder and files, that have to be returned |
System.Nullable<FileSorting> | orderBy | indicates a field to sort by |
System.Nullable<System.Boolean> | desc | indicates if sorting is descending |
System.String | searchPattern | |
System.Nullable<System.Boolean> | useRegex |
Returns
Type | Description |
---|---|
FilesVM | Returns list of the files from a specified folder |
Remarks
User with a Get DeletedFiles permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetRecycleBinFoldersAndFilesAsync(String, Nullable<Int32>, Nullable<Int32>, Nullable<FileSorting>, Nullable<Boolean>, String, Nullable<Boolean>, System.Threading.CancellationToken)
Get all folders and files from recycle bin
Declaration
public virtual async System.Threading.Tasks.Task<FilesVM> GetRecycleBinFoldersAndFilesAsync(string subscriptionId, int? skip = null, int? take = null, FileSorting? orderBy = null, bool? desc = null, string searchPattern = null, bool? useRegex = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | subscription id |
System.Nullable<System.Int32> | skip | number of folder and files, that have to be skipped |
System.Nullable<System.Int32> | take | number of folder and files, that have to be returned |
System.Nullable<FileSorting> | orderBy | indicates a field to sort by |
System.Nullable<System.Boolean> | desc | indicates if sorting is descending |
System.String | searchPattern | |
System.Nullable<System.Boolean> | useRegex | |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<FilesVM> | Returns list of the files from a specified folder |
Remarks
User with a Get DeletedFiles permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
MoveFiles(String, SelectedFilesVM)
Move folders and files to a specified folder
Declaration
public virtual void MoveFiles(string subscriptionId, SelectedFilesVM body = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | id of current subscription |
SelectedFilesVM | body | VM with files' ids and params of their destination |
Remarks
User with a Update Place permission for a files and Create permission for a destination folder can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
MoveFilesAsync(String, SelectedFilesVM, System.Threading.CancellationToken)
Move folders and files to a specified folder
Declaration
public virtual async System.Threading.Tasks.Task MoveFilesAsync(string subscriptionId, SelectedFilesVM body = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | id of current subscription |
SelectedFilesVM | body | VM with files' ids and params of their destination |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | All folders and files have been moved |
Remarks
User with a Update Place permission for a files and Create permission for a destination folder can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
MoveFilesToBin(String, SelectedFilesVM)
Move folders and files to bin
Declaration
public virtual void MoveFilesToBin(string subscriptionId, SelectedFilesVM body = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | id of current subscription |
SelectedFilesVM | body | VM with files' ids and params of their destination |
Remarks
User with a Delete permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
MoveFilesToBinAsync(String, SelectedFilesVM, System.Threading.CancellationToken)
Move folders and files to bin
Declaration
public virtual async System.Threading.Tasks.Task MoveFilesToBinAsync(string subscriptionId, SelectedFilesVM body = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | id of current subscription |
SelectedFilesVM | body | VM with files' ids and params of their destination |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | All folders and files have been moved to bin |
Remarks
User with a Delete permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage, System.Collections.Generic.IReadOnlyDictionary<String, System.Collections.Generic.IEnumerable<String>>, System.Threading.CancellationToken)
Declaration
protected virtual async System.Threading.Tasks.Task<TemplateFolderAndFileClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Threading.CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpResponseMessage | response | |
System.Collections.Generic.IReadOnlyDictionary<System.String, System.Collections.Generic.IEnumerable<System.String>> | headers | |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TemplateFolderAndFileClient.ObjectResponseResult<T>> |
Type Parameters
Name | Description |
---|---|
T |
RecoverAllFromRecycleBin(String)
Recover all folders and files from recycle bin
Declaration
public virtual void RecoverAllFromRecycleBin(string subscriptionId)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | subscription id |
Remarks
User with a Create RecycleBin permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
RecoverAllFromRecycleBinAsync(String, System.Threading.CancellationToken)
Recover all folders and files from recycle bin
Declaration
public virtual async System.Threading.Tasks.Task RecoverAllFromRecycleBinAsync(string subscriptionId, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | subscription id |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | All folders and files in bin have been restored |
Remarks
User with a Create RecycleBin permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
RecoverFiles(String, SelectedFilesVM)
Recover folders and files from bin
Declaration
public virtual void RecoverFiles(string subscriptionId, SelectedFilesVM body = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | id of current subscription |
SelectedFilesVM | body | VM with files' ids and params of their destination |
Remarks
User with a SubscriptionCreate permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
RecoverFilesAsync(String, SelectedFilesVM, System.Threading.CancellationToken)
Recover folders and files from bin
Declaration
public virtual async System.Threading.Tasks.Task RecoverFilesAsync(string subscriptionId, SelectedFilesVM body = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | id of current subscription |
SelectedFilesVM | body | VM with files' ids and params of their destination |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | All folders and files have been recovered |
Remarks
User with a SubscriptionCreate permission can access this method.
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |