IO functions

AppendToLocalFile

Declaration

void AppendToLocalFile(string name, string content)

Description

Appends text to a local file. If the file does not exist, it will be created.

Supported Runtime Versions

3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
name Name of the file to append content to.
content The content to be appended to the file.

Return Value

Does not return a value.

AppendToLocalFile

Declaration

void AppendToLocalFile(string name, string content, string encoding)

Description

Appends text to a local file. If the file does not exist, it will be created.

Supported Runtime Versions

3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
name Name of the file to append content to.
content The content to be appended to the file.
encoding The encoding of the content to be appended.

Return Value

Does not return a value.

BinaryDataCompress

Declaration

BinaryData BinaryDataCompress(BinaryData sourceData, string method, bool compress)

Description

Compress/decompress binary data and return processed binary data.

Supported Runtime Versions

5.0

Parameters Description
sourceData Data to process.
method Compression method. Currently supported methods: deflate.
compress True to compress and false to decompress.

Return Value

Processed binary data.

BinaryDataCreateFromString

Declaration

BinaryData BinaryDataCreateFromString(string text)

Description

Creates binary data from the text using UTF-8 encoding.

Supported Runtime Versions

5.0

Parameters Description
text String to read data from.

Return Value

Binary data.

BinaryDataCreateFromString

Declaration

BinaryData BinaryDataCreateFromString(string text, string encoding)

Description

Creates binary data from the text using specified encoding.

Supported Runtime Versions

5.0

Parameters Description
text String to read data from.
encoding Encoding for the conversion to binary data.

Return Value

Binary data.

BinaryDataGetLength

Declaration

double BinaryDataGetLength(BinaryData binaryData)

Description

Returns the length of the binary data stream.

Supported Runtime Versions

5.0

Parameters Description
binaryData Binary data stream to be checked.

Return Value

Length of the binary data stream.

BinaryDataRelease

Declaration

void BinaryDataRelease(BinaryData binaryData)

Description

Releases binary stream resources.

Supported Runtime Versions

5.0

Parameters Description
binaryData Binary data stream to be released.

Return Value

Does not return a value.

BookExportProfileAddReport

Declaration

BookExportProfile BookExportProfileAddReport(BookExportProfile profile, string reportName, int reportPosition, string documentName)

Description

Add a report to a report book to a particular position in the book. If the position is already occupied by another report, an exception will be thrown. If the position value is not specified (values 0 or lower), the position will be automatically generated as a lowest integer that is higher then all positions that are already taken in the profile.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Report unique name to identify the report. If the value is empty, the report will be searched only by reportPosition.
reportPosition The position of the report in the book. Report positions are numbered starting with 1, the same as in AppStudio. Sporadic numbering is supported. If the value is 0 or lower, the report will be assigned added at the end of the profile with a generated position number, that will be higher the all the other report positions in the profile.
documentName Report document name.

Return Value

BookExportProfile instance.

BookExportProfileAddReport

Declaration

BookExportProfile BookExportProfileAddReport(BookExportProfile profile, string reportName, int reportPosition, string documentName, BookExportDocumentType documentType)

Description

Add a report to a report book to a particular position in the book. If the position is already occupied by another report, an exception will be thrown. If the position value is not specified (values 0 or lower), the position will be automatically generated as a lowest integer that is higher then all positions that are already taken in the profile.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Report unique name to identify the report. If the value is empty, the report will be searched only by reportPosition.
reportPosition The position of the report in the book. Report positions are numbered starting with 1, the same as in AppStudio. Sporadic numbering is supported. If the value is 0 or lower, the report will be assigned added at the end of the profile with a generated position number, that will be higher the all the other report positions in the profile.
documentName Report document name.
documentType Report document type.

Return Value

BookExportProfile instance.

BookExportProfileAddSelection

Declaration

BookExportProfile BookExportProfileAddSelection(BookExportProfile profile, string reportName, int reportPosition, string reportObjectUniqueName, BookExportSelectionType selectionType, string uniqueName)

Description

Add a selection to the report object of a book report. If the particular report object has Automatic selection mode or AllElements selection mode, this selection is cleared (deleted), and the selection mode is set to Selection and new selection is added by this function call. On the other hand, if the report object already has selection mode set to Selection and there are already active selections, then no clearing is done and the new selection is simply added to it. If the report is not present in the profile, it is added. The selectionType must be set to non-ranged type, otherwise an exception is thrown.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Report unique name to identify the report. If the value is empty, the report will be searched only by reportPosition.
reportPosition The position of the report in the book. Report positions are numbered starting with 1, the same as in AppStudio. Sporadic numbering is supported. If the value is 0 or lower, the report will be searched only by reportName.
reportObjectUniqueName The unique name of the report object.
selectionType The type of selection to be added.
uniqueName Element unique name used for the selection. The unique name must be in MDX format.

Return Value

BookExportProfile instance.

BookExportProfileAddSelection

Declaration

BookExportProfile BookExportProfileAddSelection(BookExportProfile profile, string reportName, int reportPosition, string reportObjectUniqueName, BookExportSelectionType selectionType, string uniqueNameFrom, string uniqueNameTo)

Description

Add a ranged selection to the selections of a book report. If the particular report object has Automatic selection mode or AllElements selection mode, this selection is cleared (deleted), and the selection mode is set to Selection and new selection is added by this function call. On the other hand, if the report object already has selection mode set to Selection and there are already active selections, then no clearing is done and the new selection is simply added to it. If the report is not present in the profile, it is added. The selectionType must be set to a ranged type, otherwise an exception is thrown.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Report unique name to identify the report. If the value is empty, the report will be searched only by reportPosition.
reportPosition The position of the report in the book. Report positions are numbered starting with 1, the same as in AppStudio. Sporadic numbering is supported. If the value is 0 or lower, the report will be searched only by reportName.
reportObjectUniqueName The unique name of the report object.
selectionType The type of selection to be added.
uniqueNameFrom Element unique name (from) used for the selection. The unique name must be in MDX format.
uniqueNameTo Element unique name (to) used for the selection. The unique name must be in MDX format.

Return Value

BookExportProfile instance.

BookExportProfileClearSelections

Declaration

BookExportProfile BookExportProfileClearSelections(BookExportProfile profile, string reportName, int reportPosition, string reportObjectUniqueName)

Description

Clear all selections on a report object and sets the current selection mode of the report object to Automatic. If the report is not present in the profile, it is added.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Report unique name to identify the report. If the value is empty, the report will be searched only by reportPosition.
reportPosition The position of the report in the book. Report positions are numbered starting with 1, the same as in AppStudio. Sporadic numbering is supported. If the value is 0 or lower, the report will be searched only by reportName.
reportObjectUniqueName The unique name of the report object.

Return Value

BookExportProfile instance.

BookExportProfileGetReportCount

Declaration

int BookExportProfileGetReportCount(BookExportProfile profile)

Description

Get count of reports in the book export profile.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.

Return Value

Unique name of the reports in the book export profile.

BookExportProfileGetReportObjectNames

Declaration

StringList BookExportProfileGetReportObjectNames(BookExportProfile profile, string reportName)

Description

Get unique names of report objects of a particular report in book export profile.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Unique name of the report.

Return Value

Unique names of the report objects.

BookExportProfileGetReportObjectNames

Declaration

StringList BookExportProfileGetReportObjectNames(BookExportProfile profile, string reportName, int reportPosition)

Description

Get unique names of report objects of a particular report in book export profile.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Unique name of the report.
reportPosition Position of the report.

Return Value

Unique names of the report objects.

BookExportProfileGetReportPositionByIndex

Declaration

int BookExportProfileGetReportPositionByIndex(BookExportProfile profile, int index)

Description

Get report's position by index.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
index Index of the report in the book export profile.

Return Value

Unique name of the reports in the book export profile.

BookExportProfileGetReportUniqueNameByIndex

Declaration

string BookExportProfileGetReportUniqueNameByIndex(BookExportProfile profile, int index)

Description

Get report's unique name by index.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
index Index of the report in the book export profile.

Return Value

Unique name of the reports in the book export profile.

BookExportProfileGetType

Declaration

BookExportProfileType BookExportProfileGetType(BookExportProfile profile)

Description

Gets the type of BookExportProfile.

Supported Runtime Versions

5.0

Parameters Description
profile BookExportProfile instance.

Return Value

Instance of BookExportProfileType enum.

BookExportProfileIsReportSkipped

Declaration

bool BookExportProfileIsReportSkipped(BookExportProfile profile, string reportName, int reportPosition)

Description

Get if a report is skipped during the book export.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Report unique name to identify the report. If the value is empty, the report will be searched only by reportPosition.
reportPosition The position of the report in the book. Report positions are numbered starting with 1, the same as in AppStudio. Sporadic numbering is supported. If the value is 0 or lower, the report will be searched only by reportName.

Return Value

True or false.

BookExportProfileSetReportDocumentName

Declaration

BookExportProfile BookExportProfileSetReportDocumentName(BookExportProfile profile, string reportName, int reportPosition, string documentName)

Description

Set document name of a report in a report book. If the report is not present in the profile, it is added.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Report unique name to identify the report. If the value is empty, the report will be searched only by reportPosition.
reportPosition The position of the report in the book. Report positions are numbered starting with 1, the same as in AppStudio. Sporadic numbering is supported. If the value is 0 or lower, the report will be searched only by reportName.
documentName Report document name.

Return Value

BookExportProfile instance.

BookExportProfileSetReportDocumentType

Declaration

BookExportProfile BookExportProfileSetReportDocumentType(BookExportProfile profile, string reportName, int reportPosition, BookExportDocumentType documentType)

Description

Set document type of a report in a report book. If the report is not present in the profile, it is added.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Report unique name to identify the report. If the value is empty, the report will be searched only by reportPosition.
reportPosition The position of the report in the book. Report positions are numbered starting with 1, the same as in AppStudio. Sporadic numbering is supported. If the value is 0 or lower, the report will be searched only by reportName.
documentType Report document type.

Return Value

BookExportProfile instance.

BookExportProfileSetSelection

Declaration

BookExportProfile BookExportProfileSetSelection(BookExportProfile profile, string reportName, int reportPosition, string reportObjectUniqueName, BookExportSelectionType selectionType, string uniqueName)

Description

Set a ranged selection to the selections of a book report. All existing selections are deleted and the new selection is set the selection list. The current selection mode of the report object is set to Selection. If the report is not present in the profile, it is added. The selectionType must be set to non-ranged type, otherwise an exception is thrown.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Report unique name to identify the report. If the value is empty, the report will be searched only by reportPosition.
reportPosition The position of the report in the book. Report positions are numbered starting with 1, the same as in AppStudio. Sporadic numbering is supported. If the value is 0 or lower, the report will be searched only by reportName.
reportObjectUniqueName The unique name of the report object.
selectionType The type of selection to be added.
uniqueName Element unique name used for the selection. The unique name must be in MDX format.

Return Value

BookExportProfile instance.

BookExportProfileSetSelection

Declaration

BookExportProfile BookExportProfileSetSelection(BookExportProfile profile, string reportName, int reportPosition, string reportObjectUniqueName, BookExportSelectionType selectionType, string uniqueNameFrom, string uniqueNameTo)

Description

Set a ranged selection to the selections of a book report. All existing selections are deleted and the new selection is set the selection list. The current selection mode of the report object is set to Selection. If the report is not present in the profile, it is added. The selectionType must be set to a ranged type, otherwise an exception is thrown.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Report unique name to identify the report. If the value is empty, the report will be searched only by reportPosition.
reportPosition The position of the report in the book. Report positions are numbered starting with 1, the same as in AppStudio. Sporadic numbering is supported. If the value is 0 or lower, the report will be searched only by reportName.
reportObjectUniqueName The unique name of the report object.
selectionType The type of selection to be added.
uniqueNameFrom Element unique name (from) used for the selection. The unique name must be in MDX format.
uniqueNameTo Element unique name (to) used for the selection. The unique name must be in MDX format.

Return Value

BookExportProfile instance.

BookExportProfileSetSelectionElementSource

Declaration

BookExportProfile BookExportProfileSetSelectionElementSource(BookExportProfile profile, string reportName, int reportPosition, string reportObjectUniqueName, string alias, string cube, string dimension, string hierarchy)

Description

Set element source of a report object on a report in a report book. If the report is not present in the profile, it is added.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Report unique name to identify the report. If the value is empty, the report will be searched only by reportPosition.
reportPosition The position of the report in the book. Report positions are numbered starting with 1, the same as in AppStudio. Sporadic numbering is supported. If the value is 0 or lower, the report will be searched only by reportName.
reportObjectUniqueName The unique name of the report object.
alias Database alias for the element source.
cube Name of the cube for the element source.
dimension Name of the dimension for the element source.
hierarchy Name of the hierarchy for the element source.

Return Value

BookExportProfile instance.

BookExportProfileSetSelectionElementSource

Declaration

BookExportProfile BookExportProfileSetSelectionElementSource(BookExportProfile profile, string reportName, int reportPosition, string reportObjectUniqueName, string listDefinition)

Description

Set element source of a report object on a report in a report book. If the report is not present in the profile, it is added.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Report unique name to identify the report. If the value is empty, the report will be searched only by reportPosition.
reportPosition The position of the report in the book. Report positions are numbered starting with 1, the same as in AppStudio. Sporadic numbering is supported. If the value is 0 or lower, the report will be searched only by reportName.
reportObjectUniqueName The unique name of the report object.
listDefinition Xml definition of a list.

Return Value

BookExportProfile instance.

BookExportProfileSetSelectionMode

Declaration

BookExportProfile BookExportProfileSetSelectionMode(BookExportProfile profile, string reportName, int reportPosition, string reportObjectUniqueName, BookExportSelectionMode selectionMode)

Description

Set the selection mode of a report object on a report in a report book. If the report is not present in the profile, it is added.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Report unique name to identify the report. If the value is empty, the report will be searched only by reportPosition.
reportPosition The position of the report in the book. Report positions are numbered starting with 1, the same as in AppStudio. Sporadic numbering is supported. If the value is 0 or lower, the report will be searched only by reportName.
reportObjectUniqueName The unique name of the report object.
selectionMode Report selection mode.

Return Value

BookExportProfile instance.

BookExportProfileSetSelectionSplitBy

Declaration

BookExportProfile BookExportProfileSetSelectionSplitBy(BookExportProfile profile, string reportName, int reportPosition, string reportObjectUniqueName, bool splitBy)

Description

Set split-by flag of a report object on a report in a report book. If the report is not present in the profile, it is added.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Report unique name to identify the report. If the value is empty, the report will be searched only by reportPosition.
reportPosition The position of the report in the book. Report positions are numbered starting with 1, the same as in AppStudio. Sporadic numbering is supported. If the value is 0 or lower, the report will be searched only by reportName.
reportObjectUniqueName The unique name of the report object.
splitBy Report selection split-by.

Return Value

BookExportProfile instance.

BookExportProfileSetType

Declaration

BookExportProfile BookExportProfileSetType(BookExportProfile profile, BookExportProfileType type)

Description

Sets the type of BookExportProfile.

Supported Runtime Versions

5.0

Parameters Description
profile BookExportProfile instance.
type Profile type to be set.

Return Value

Instance of BookExportProfileType enum.

BookExportProfileSkipReport

Declaration

BookExportProfile BookExportProfileSkipReport(BookExportProfile profile, string reportName, int reportPosition)

Description

Skip a report in a report book during book export.

Supported Runtime Versions

5.0

Parameters Description
profile Instance of BookExportProfile.
reportName Report unique name to identify the report. If the value is empty, the report will be searched only by reportPosition.
reportPosition The position of the report in the book. Report positions are numbered starting with 1, the same as in AppStudio. Sporadic numbering is supported. If the value is 0 or lower, the report will be searched only by reportName.

Return Value

BookExportProfile instance.

BookExportResultGetBinaryData

Declaration

BinaryData BookExportResultGetBinaryData(BookExportResult bookExportResult)

Description

Get instance of BinaryData from BookExportResult.

Supported Runtime Versions

5.0

Parameters Description
bookExportResult Instance of BookExportResult.

Return Value

Instance of BinaryData.

BookExportResultGetFileName

Declaration

string BookExportResultGetFileName(BookExportResult bookExportResult)

Description

Get a file name from BookExportResult.

Supported Runtime Versions

5.0

Parameters Description
bookExportResult Instance of BookExportResult.

Return Value

Filename of BookExportResult.

BookExportSelectionTypeIsRanged

Declaration

bool BookExportSelectionTypeIsRanged(BookExportSelectionType value)

Description

Get if the selection type is ranged.

Supported Runtime Versions

5.0

Parameters Description
value Instance of BookExportSelectionType.

Return Value

True or false.

CreateBookExportProfile

Declaration

BookExportProfile CreateBookExportProfile(BookExportProfileType type)

Description

Create a new instance of BookExportProfile.

Supported Runtime Versions

5.0

Parameters Description
type Type of the book export profile to be created.

Return Value

Instance of BookExportProfile.

CreateBookExportProfile

Declaration

BookExportProfile CreateBookExportProfile(string exportProfile)

Description

Create a new instance of BookExportProfile from json string.

Supported Runtime Versions

5.0

Parameters Description
exportProfile BookExportProfile serialized as json string.

Return Value

BookExportProfile instance parsed from the string.

CreateLocalFile

Declaration

void CreateLocalFile(string name)

Description

Creates a new file.

Supported Runtime Versions

3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
name Name of the file to be created.

Return Value

Does not return a value.

CreateRepositoryConnection

Declaration

RepositoryConnection CreateRepositoryConnection(string repository, string project, string user, string password)

Description

Not supported anymore, throws an error. Original behavior: Creates a connection to a repository using password authentication.

Supported Runtime Versions

4.0, 5.0

Parameters Description
repository Name of the repository, no longer needed and thus ignored.
project Name of the project in the repository.
user User name to be used for repository connection.
password Password to be used for repository connection.

Return Value

Connection to a repository as specified by the connection parameters.

CreateRepositoryConnection

Declaration

RepositoryConnection CreateRepositoryConnection(string repository, string project, string ticket)

Description

Not supported anymore, throws an error. Original behavior: Creates a connection to a repository using ticket authentication.

Supported Runtime Versions

4.0, 5.0

Parameters Description
repository Name of the repository, no longer needed and thus ignored.
project Name of the project in the repository.
ticket Ticket to be used for authentication.

Return Value

Connection to a repository as specified by the connection parameters.

CreateRepositoryConnectionExisting

Declaration

RepositoryConnection CreateRepositoryConnectionExisting()

Description

Creates a connection to a repository using ticket authentication.

Supported Runtime Versions

5.0

Parameters

The function has no parameters.

Return Value

Connection to a repository as specified by the connection parameters.

DeleteLocalFile

Declaration

void DeleteLocalFile(string name)

Description

Deletes a local file. If it fails, an exception is thrown.

Supported Runtime Versions

5.0

This function is not supported in a cloud environment.

Parameters Description
name Name of the file to be deleted.

Return Value

Does not return a value.

ExportReportBook

Declaration

BookExportResult ExportReportBook(string applicationName, string bookName, BookExportOutputType outputFormat)

Description

Export an AppStudio report book to a specific file format.

Supported Runtime Versions

5.0

Parameters Description
applicationName Application name.
bookName Report book’s name.
outputFormat Output format.

Return Value

BinaryData containing the report book.

ExportReportBook

Declaration

BookExportResult ExportReportBook(string applicationName, string bookName, BookExportOutputType outputFormat, BookExportProfile exportProfile)

Description

Export an AppStudio report book to a specific file format.

Supported Runtime Versions

5.0

Parameters Description
applicationName Application name.
bookName Report book name.
outputFormat Output format.
exportProfile Book export profile.

Return Value

BinaryData containing the report book.

ExportReportBook

Declaration

BookExportResult ExportReportBook(string applicationName, string bookName, BookExportOutputType outputFormat, bool usePageLayout, BookExportImageType imageFormat)

Description

Export an AppStudio report book to a specific file format.

Supported Runtime Versions

5.0

Parameters Description
applicationName Application name.
bookName Report book name.
outputFormat Output format.
usePageLayout Use page layout.
imageFormat Image format.

Return Value

BinaryData containing the report book.

ExportReportBook

Declaration

BookExportResult ExportReportBook(string applicationName, string bookName, BookExportOutputType outputFormat, bool usePageLayout, BookExportImageType imageFormat, BookExportProfile exportProfile)

Description

Export an AppStudio report book to a specific file format.

Supported Runtime Versions

5.0

Parameters Description
applicationName Application name.
bookName Report book’s name.
outputFormat Output format.
usePageLayout Use page layout.
imageFormat Image format.
exportProfile Book export profile.

Return Value

BinaryData containing the report book.

GetBookExportProfile

Declaration

BookExportProfile GetBookExportProfile(string applicationName, string bookUniqueName)

Description

Retrieves a book export profile of a report book. The returned export profile is alway full profile. If the book is not found, an exception is thrown.

Supported Runtime Versions

5.0

Parameters Description
applicationName Application name.
bookUniqueName Report book unique name.

Return Value

Export profile of a report book.

GetCOSTicket

Declaration

string GetCOSTicket(RepositoryConnection connection)

Description

Gets a COS ticket from a certain repository connection.

Supported Runtime Versions

5.0

Parameters Description
connection Repository connection to get a COS ticket from.

Return Value

The connection's COS ticket.

LocalFileExists

Declaration

bool LocalFileExists(string name)

Description

Checks if a given file exists.

Supported Runtime Versions

5.0

This function is not supported in a cloud environment.

Parameters Description
name Name of the file to check.

Return Value

Returns true if the file exists.

LocalGetFileLength

Declaration

double LocalGetFileLength(string name)

Description

Gets the size of a given file.

Supported Runtime Versions

5.0

This function is not supported in a cloud environment.

Parameters Description
name Name of the file to check.

Return Value

File size value.

ParseCsvDocument

Declaration

StringListList ParseCsvDocument(string csvDocument, string separator, string quoteChar, string quoteEscChar, bool useQuotes, bool unquoteValues, int skipLines, IntArray selectColumns)

Description

Parses a string containing CSV data and returns its content.

Supported Runtime Versions

5.0

Parameters Description
csvDocument The string to be parsed.
separator The character used for separating fields in the CSV file.
quoteChar The character used for quoting single fields in the CSV file.
quoteEscChar The character used for escaping the quote character when it occurs in a value.
useQuotes Determines whether fields should be quoted (true) or not (false).
unquoteValues Determines whether quotes around fields should be returned (false) or not (true).
skipLines Sets the number of lines to be ignored at the beginning of the CSV file.
selectColumns Specifies the indices of the columns to be returned.

Return Value

The content of the CSV string.

ParseCsvDocument

Declaration

StringListList ParseCsvDocument(string csvDocument)

Description

Parses a string containing CSV data and returns its content. This function uses default values for the CSV parser: Separator is ",", quote character is ", quote escape character is ", fields should be quoted, quotes will not be returned.

Supported Runtime Versions

5.0

Parameters Description
csvDocument The string to be parsed.

Return Value

The content of the CSV string.

ParseCsvDocument

Declaration

StringListList ParseCsvDocument(string csvDocument, string separator, string quoteChar, string quoteEscChar, bool useQuotes, bool unquoteValues)

Description

Parses a string containing CSV data and returns its content.

Supported Runtime Versions

5.0

Parameters Description
csvDocument The string to be parsed.
separator The character used for separating fields in the CSV file.
quoteChar The character used for quoting single fields in the CSV file.
quoteEscChar The character used for escaping the quote character when it occurs in a value.
useQuotes Determines whether fields should be quoted (true) or not (false).
unquoteValues Determines whether quotes around fields should be returned (false) or not (true).

Return Value

The content of the CSV file.

ReadBinaryDataFromLocalFile

Declaration

BinaryData ReadBinaryDataFromLocalFile(string fileName)

Description

Reads the file content to the stream.

Supported Runtime Versions

5.0

This function is not supported in a cloud environment.

Parameters Description
fileName File path to read data from.

Return Value

Binary data.

ReadFile

Declaration

string ReadFile(string url, string encoding)

Description

Reads a file from an URL. The encoding is automatically detected based on the file BOM. If the detection fails, the encoding provided by user is used.

Supported Runtime Versions

4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
url Location of the file to be read.
encoding The encoding used if encoding autodetection fails.

Return Value

The file's content.

ReadFile

Declaration

string ReadFile(string url)

Description

Reads a file from an URL. The encoding is automatically detected based on the file BOM. If the detection fails, the encoding for operating system's current code page is used.

Supported Runtime Versions

3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
url Location of the file to be read.

Return Value

The file's content.

ReadLocalFile

Declaration

string ReadLocalFile(string name)

Description

Reads a file from a local file system. The encoding is automatically detected based on the file BOM. If the detection fails, UTF-8 encoding is used.

Supported Runtime Versions

3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
name Name of the file to be read.

Return Value

The file's content.

ReadLocalFile

Declaration

string ReadLocalFile(string name, string encoding)

Description

Reads a file from a local file system. The encoding is automatically detected based on the file BOM. If the detection fails, the encoding provided by user is used.

Supported Runtime Versions

3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
name Name of the file to be read.
encoding The encoding used if encoding autodetection fails.

Return Value

The file's content.

RepositoryCreateFile

Declaration

string RepositoryCreateFile(RepositoryConnection repositoryConnection, string attachmentName, string content)

Description

Creates a new attachment for a repository project. The content is written in UTF-8 encoding.

Supported Runtime Versions

5.0

Parameters Description
repositoryConnection Repository connection that points to the project.
attachmentName Name of the attachment to be created.
content The content of the attachment.

Return Value

Id of newly created attachment.

RepositoryCreateFile

Declaration

string RepositoryCreateFile(RepositoryConnection repositoryConnection, string attachmentName, BinaryData binaryData)

Description

Creates new repository attachment and writes the stream content into it.

Supported Runtime Versions

5.0

Parameters Description
repositoryConnection Repository connection that points to the project.
attachmentName Name of the attachment to write data to.
binaryData Binary data to write to the repository.

Return Value

Name of the repository attachment.

RepositoryCreateSharedMedia

Declaration

string RepositoryCreateSharedMedia(RepositoryConnection repositoryConnection, string mediaUniqueName, string mediaDescription, string mediaType, SharedMediaType fileName, BinaryData binaryData)

Description

Writes the stream content to the Shared Media of a given repository.

Supported Runtime Versions

5.0

Parameters Description
repositoryConnection Repository connection that points to the project.
mediaUniqueName Name of the Shared Media.
mediaDescription Description of the Shared Media.
mediaType Type of the Shared Media. Supported Types: Sound, Movie, Icon, Animation, Picture.
fileName File name of the Shared Media.
binaryData Binary data to write to the repository.

Return Value

Name of the Shared Media object.

RepositoryDeleteFile

Declaration

bool RepositoryDeleteFile(RepositoryConnection repositoryConnection, string attachmentId)

Description

Deletes an attachment from a repository project.

Supported Runtime Versions

4.0, 5.0

Parameters Description
repositoryConnection Repository connection that points to the project.
attachmentId ID of the attachment to be deleted.

Return Value

True if the attachment could be deleted. False if it could not be deleted.

RepositoryDeleteSharedMedia

Declaration

bool RepositoryDeleteSharedMedia(RepositoryConnection repositoryConnection, string mediaUniqueName)

Description

Deletes the given Shared Media from a repository project.

Supported Runtime Versions

5.0

Parameters Description
repositoryConnection Repository connection that points to the project.
mediaUniqueName Unique name of the Shared Media to be deleted.

Return Value

True if the given Shared Media could be deleted.

RepositoryDisconnect

Declaration

void RepositoryDisconnect(RepositoryConnection connection)

Description

Disconnects a certain repository connection.

Supported Runtime Versions

4.0, 5.0

Parameters Description
connection Repository connection to be disconnected.

Return Value

Does not return a value.

RepositoryFileExists

Declaration

bool RepositoryFileExists(RepositoryConnection repositoryConnection, string attachmentId)

Description

Checks if the given repository file exists.

Supported Runtime Versions

5.0

Parameters Description
repositoryConnection Repository connection that points to the project to check the file.
attachmentId ID of the file to be checked.

Return Value

Returns true if the file exists.

RepositoryGetFileLength

Declaration

double RepositoryGetFileLength(RepositoryConnection repositoryConnection, string attachmentId)

Description

Gets the size of a given repository file.

Supported Runtime Versions

5.0

Parameters Description
repositoryConnection Repository connection that points to the project to check the file.
attachmentId ID of the file to be checked.

Return Value

File size value.

RepositoryReadBinaryData

Declaration

BinaryData RepositoryReadBinaryData(RepositoryConnection repositoryConnection, string attachmentId)

Description

Reads the repository content (attachment) to the binary data stream.

Supported Runtime Versions

5.0

Parameters Description
repositoryConnection Repository connection that points to the project.
attachmentId ID of the attachment to read data from.

Return Value

Binary data.

RepositoryReadCsvFile

Declaration

StringListList RepositoryReadCsvFile(RepositoryConnection repositoryConnection, string attachmentId, string separator, string quoteChar, string quoteEscChar, bool useQuotes, bool unquoteValues, int skipLines, IntArray selectColumns)

Description

Reads a CSV file from a repository project and returns its content.

Supported Runtime Versions

4.0, 5.0

Parameters Description
repositoryConnection Repository connection that points to the project to read the CSV file from.
attachmentId ID of the file to be read.
separator The character used for separating fields in the CSV file.
quoteChar The character used for quoting single fields in the CSV file.
quoteEscChar The character used for escaping the quote character when it occurs in a value.
useQuotes Determines whether fields should be quoted (true) or not (false).
unquoteValues Determines whether quotes around fields should be returned (false) or not (true).
skipLines Sets the number of lines to be ignored at the beginning of the CSV file.
selectColumns Specifies the indices of the columns to be returned.

Return Value

The content of the CSV file.

RepositoryReadCsvFile

Declaration

StringListList RepositoryReadCsvFile(RepositoryConnection repositoryConnection, string attachmentId)

Description

Reads a CSV file from a repository project and returns its content. This function uses default values for the CSV parser: Separator is ",", quote character is ", quote escape character is ", fields should be quoted, quotes will not be returned. The UTF-8 encoding is used to read the content.

Supported Runtime Versions

4.0, 5.0

Parameters Description
repositoryConnection Repository connection that points to the project to read the CSV file from.
attachmentId ID of the file to be read.

Return Value

The content of the CSV file.

RepositoryReadCsvFile

Declaration

StringListList RepositoryReadCsvFile(RepositoryConnection repositoryConnection, string attachmentId, string separator, string quoteChar, string quoteEscChar, bool useQuotes, bool unquoteValues)

Description

Reads a CSV file from a repository project and returns its content.

Supported Runtime Versions

4.0, 5.0

Parameters Description
repositoryConnection Repository connection that points to the project to read the CSV file from.
attachmentId ID of the file to be read.
separator The character used for separating fields in the CSV file.
quoteChar The character used for quoting single fields in the CSV file.
quoteEscChar The character used for escaping the quote character when it occurs in a value.
useQuotes Determines whether fields should be quoted (true) or not (false).
unquoteValues Determines whether quotes around fields should be returned (false) or not (true).

Return Value

The content of the CSV file.

RepositoryReadCsvFile

Declaration

StringListList RepositoryReadCsvFile(RepositoryConnection repositoryConnection, string attachmentId, string encoding)

Description

Reads a CSV file from a repository project and returns its content. This function uses default values for the CSV parser: Separator is ",", quote character is ", quote escape character is ", fields should be quoted, quotes will not be returned.

Supported Runtime Versions

4.0, 5.0

Parameters Description
repositoryConnection Repository connection that points to the project to read the CSV file from.
attachmentId ID of the file to be read.
encoding The encoding used to read the file.

Return Value

The content of the CSV file.

RepositoryReadCsvFile

Declaration

StringListList RepositoryReadCsvFile(RepositoryConnection repositoryConnection, string attachmentId, string encoding, string separator, string quoteChar, string quoteEscChar, bool useQuotes, bool unquoteValues)

Description

Reads a CSV file from a repository project and returns its content.

Supported Runtime Versions

4.0, 5.0

Parameters Description
repositoryConnection Repository connection that points to the project to read the CSV file from.
attachmentId ID of the file to be read.
encoding The encoding used to read the file.
separator The character used for separating fields in the CSV file.
quoteChar The character used for quoting single fields in the CSV file.
quoteEscChar The character used for escaping the quote character when it occurs in a value.
useQuotes Determines whether fields should be quoted (true) or not (false).
unquoteValues Determines whether quotes around fields should be returned (false) or not (true).

Return Value

The content of the CSV file.

RepositoryReadCsvFile

Declaration

StringListList RepositoryReadCsvFile(RepositoryConnection repositoryConnection, string attachmentId, string encoding, string separator, string quoteChar, string quoteEscChar, bool useQuotes, bool unquoteValues, int skipLines, IntArray selectColumns)

Description

Reads a CSV file from a repository project and returns its content.

Supported Runtime Versions

4.0, 5.0

Parameters Description
repositoryConnection Repository connection that points to the project to read the CSV file from.
attachmentId ID of the file to be read.
encoding The encoding used to read the file.
separator The character used for separating fields in the CSV file.
quoteChar The character used for quoting single fields in the CSV file.
quoteEscChar The character used for escaping the quote character when it occurs in a value.
useQuotes Determines whether fields should be quoted (true) or not (false).
unquoteValues Determines whether quotes around fields should be returned (false) or not (true).
skipLines Sets the number of lines to be ignored at the beginning of the CSV file.
selectColumns Specifies the indices of the columns to be returned.

Return Value

The content of the CSV file.

RepositoryReadFile

Declaration

string RepositoryReadFile(RepositoryConnection repositoryConnection, string attachmentId)

Description

Reads a file from a repository project and returns its content. The UTF-8 encoding is used to read the content.

Supported Runtime Versions

4.0, 5.0

Parameters Description
repositoryConnection Repository connection that points to the project to read the file from.
attachmentId ID of the file to be read.

Return Value

The file's content.

RepositoryReadFile

Declaration

string RepositoryReadFile(RepositoryConnection repositoryConnection, string attachmentId, string encoding)

Description

Reads a file from a repository project and returns its content.

Supported Runtime Versions

4.0, 5.0

Parameters Description
repositoryConnection Repository connection that points to the project to read the file from.
attachmentId ID of the file to be read.
encoding The encoding used to read the content.

Return Value

The file's content.

RepositoryReadSharedMedia

Declaration

BinaryData RepositoryReadSharedMedia(RepositoryConnection repositoryConnection, string mediaUniqueName)

Description

Reads the Shared Media data into the binary data stream.

Supported Runtime Versions

5.0

Parameters Description
repositoryConnection Repository connection that points to the project.
mediaUniqueName Shared Media unique name.

Return Value

Binary data.

RepositorySharedMediaExists

Declaration

bool RepositorySharedMediaExists(RepositoryConnection repositoryConnection, string mediaUniqueName)

Description

Checks if the given Shared Media exists.

Supported Runtime Versions

5.0

Parameters Description
repositoryConnection Repository connection that points to the project.
mediaUniqueName Unique name of the Shared Media to be checked.

Return Value

True if the given Shared Media could be deleted.

WriteLocalFile

Declaration

void WriteLocalFile(string fileName, BinaryData binaryData)

Description

Writes the stream content to the file.

Supported Runtime Versions

5.0

This function is not supported in a cloud environment.

Parameters Description
fileName File path to write data to.
binaryData Binary data to write to file to.

Return Value

Does not return a value.

WriteLocalFile

Declaration

void WriteLocalFile(string name, string content)

Description

Writes a file to a local file system.

Supported Runtime Versions

3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
name Name of the file to be written.
content Content of the file to be written.

Return Value

Does not return a value.

WriteLocalFile

Declaration

void WriteLocalFile(string name, string content, string encoding)

Description

Writes a file to a local file system and applies a certain encoding to its content.

Supported Runtime Versions

3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
name Name of the file to be written.
content Content of the file to be written.
encoding The encoding of the file to be written.

Return Value

Does not return a value.