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
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
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.
CreateLocalFile
Declaration
void CreateLocalFile(string name)
Description
Creates a new file.
Supported Runtime Versions
3.0, 4.0, 5.0
Parameters
|
Description |
---|---|
name
|
Name of the file to be created. |
Return Value
Does not return a value.
ReadFile
Declaration
string ReadFile(string url)
Description
Reads a file from an URL.
Supported Runtime Versions
3.0, 4.0, 5.0
Parameters
|
Description |
---|---|
url
|
Location of the file to be read. |
Return Value
The file's content.
ReadFile
Declaration
string ReadFile(string url, string encoding)
Description
Reads a file from an URL.
Supported Runtime Versions
4.0, 5.0
Parameters
|
Description |
---|---|
url
|
Location of the file to be read. |
encoding
|
The encoding of the data to be read. |
Return Value
The file's content.
ReadLocalFile
Declaration
string ReadLocalFile(string name)
Description
Reads a file from a local file system.
Supported Runtime Versions
3.0, 4.0, 5.0
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 having a certain encoding from a local file system.
Supported Runtime Versions
3.0, 4.0, 5.0
Parameters
|
Description |
---|---|
name
|
Name of the file to be read. |
encoding
|
The encoding of the file to be read. |
Return Value
The file's content.
RepositoryDeleteFile
Declaration
bool RepositoryDeleteFile(RepositoryConnection repositoryConnection, string fileId)
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. |
fileId
|
ID of the attachment to be deleted. |
Return Value
True, if the attachment could be deleted. False, if it could not be deleted.
RepositoryReadCsvFile
Declaration
StringListList RepositoryReadCsvFile(RepositoryConnection repositoryConnection, string fileId, 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. |
fileId
|
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 fileId, 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. |
fileId
|
ID of the file to be read. |
encoding
|
The text encoding used in the file to be read. |
Return Value
The content of the CSV file.
RepositoryReadCsvFile
Declaration
StringListList RepositoryReadCsvFile(RepositoryConnection repositoryConnection, string fileId)
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. |
fileId
|
ID of the file to be read. |
Return Value
The content of the CSV file.
RepositoryReadCsvFile
Declaration
StringListList RepositoryReadCsvFile(RepositoryConnection repositoryConnection, string fileId, 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. |
fileId
|
ID of the file to be read. |
encoding
|
The text encoding used in 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 fileId, 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. |
fileId
|
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 fileId, 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. |
fileId
|
ID of the file to be read. |
encoding
|
The text encoding used in 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.
RepositoryReadFile
Declaration
string RepositoryReadFile(RepositoryConnection repositoryConnection, string fileId)
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. |
fileId
|
ID of the file to be read. |
Return Value
The file's content.
RepositoryReadFile
Declaration
string RepositoryReadFile(RepositoryConnection repositoryConnection, string fileId, 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. |
fileId
|
ID of the file to be read. |
encoding
|
The text encoding used in the file to be read. |
Return Value
The file's content.
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
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
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.