C# Класс Foretagsplatsen.Api.Resources.DocumentResource

Document archive REST resource: https://web.foretagsplatsen.se/Api/Company/{businessIdentityCode}/Document/{path} Notes: * A path that ends with a forward slash '/' denotes a folder, otherwise it is a file
Показать файл Открыть проект

Открытые методы

Метод Описание
Create ( string path, byte file ) : void

Creates a file to the document archive. Be aware of the path convention that says a file path cannot end with a slash. If the file already exists an ApiException with ApiErrorType Exists will be thrown.

CreatePath ( string path ) : void

Create a folder path. It is possible to supply a path with subfolders that will be created simultaneous. Be aware of the path convention that says if a paths ends with a slash it denotes a folder. Hence the path must end with a slash. If the path already exists an ApiException with ApiErrorType Exists will be thrown.

Delete ( string path ) : void

Delete a file or folder. If the path is a folder all folder content will be deleted too.

DocumentResource ( ApiClient client, CompanyInfo company ) : System

Instantiates a new DocumentResource object.

DocumentResource ( ApiClient client, string businessIdentityCode ) : System

Instantiates a new DocumentResource object.

DownloadFile ( string path ) : byte[]

Download a file from the document archive. Be aware of the path convention that says a file path cannot end with a slash.

Get ( string path ) : Document

Get the file or folder info for the path.

GetUrl ( string path ) : string

Url for the document archive resource.

Update ( string path, byte file ) : void

Save a file to the document archive. Be aware of the path convention that says a file path cannot end with a slash. If the file already exists it will be replaced by the new one.

UpdatePath ( string path ) : void

Update a folder path. It is possible to supply a path with subfolders that will be created simultaneous. Be aware of the path convention that says if a paths ends with a slash it denotes a folder. Hence the path must end with a slash.

Описание методов

Create() публичный Метод

Creates a file to the document archive. Be aware of the path convention that says a file path cannot end with a slash. If the file already exists an ApiException with ApiErrorType Exists will be thrown.
public Create ( string path, byte file ) : void
path string The path to the file to create
file byte The binary data to upload
Результат void

CreatePath() публичный Метод

Create a folder path. It is possible to supply a path with subfolders that will be created simultaneous. Be aware of the path convention that says if a paths ends with a slash it denotes a folder. Hence the path must end with a slash. If the path already exists an ApiException with ApiErrorType Exists will be thrown.
public CreatePath ( string path ) : void
path string The path to create.
Результат void

Delete() публичный Метод

Delete a file or folder. If the path is a folder all folder content will be deleted too.
public Delete ( string path ) : void
path string The path to the file or folder
Результат void

DocumentResource() публичный Метод

Instantiates a new DocumentResource object.
public DocumentResource ( ApiClient client, CompanyInfo company ) : System
client ApiClient REST client
company Foretagsplatsen.Api.Entities.CompanyInfo Company
Результат System

DocumentResource() публичный Метод

Instantiates a new DocumentResource object.
public DocumentResource ( ApiClient client, string businessIdentityCode ) : System
client ApiClient REST client
businessIdentityCode string Business identity code for company.
Результат System

DownloadFile() публичный Метод

Download a file from the document archive. Be aware of the path convention that says a file path cannot end with a slash.
public DownloadFile ( string path ) : byte[]
path string The path to the file.
Результат byte[]

Get() публичный Метод

Get the file or folder info for the path.
public Get ( string path ) : Document
path string The path to the file or folder
Результат Foretagsplatsen.Api.Entities.Document

GetUrl() публичный Метод

Url for the document archive resource.
public GetUrl ( string path ) : string
path string
Результат string

Update() публичный Метод

Save a file to the document archive. Be aware of the path convention that says a file path cannot end with a slash. If the file already exists it will be replaced by the new one.
public Update ( string path, byte file ) : void
path string The path to the file to create
file byte The binary data to upload
Результат void

UpdatePath() публичный Метод

Update a folder path. It is possible to supply a path with subfolders that will be created simultaneous. Be aware of the path convention that says if a paths ends with a slash it denotes a folder. Hence the path must end with a slash.
public UpdatePath ( string path ) : void
path string The path to create.
Результат void