Stream.FileSystem
Stream.FileSystem
Stream.FileSystem.ReadFileContents
string ReadFileContents(string FilePath)
Returns the content of a text file as a string.
Parameters
|
Parameter |
Description |
|
FilePath |
Full path of the file |
Returns
string
Example
var result = Stream.FileSystem.ReadFileContents("FilePath");
Stream.FileSystem.ReadTagsFromFileJson
string ReadTagsFromFileJson(string FilePath)
Read Tags Values from in Json format and update tags
Parameters
|
Parameter |
Description |
|
FilePath |
Full path of the file |
Returns
string
Example
var result = Stream.FileSystem.ReadTagsFromFileJson("FilePath");
Stream.FileSystem.SaveTagsToFileJson
string SaveTagsToFileJson(string FilePath, string TagNamesCSV)
Save Tags Values in Json format
Parameters
|
Parameter |
Description |
|
FilePath |
Full path of the file |
|
TagNamesCSV |
Names of the required tags separated by commas (example: Tag1,Tag2) |
Returns
string
Example
var result = Stream.FileSystem.SaveTagsToFileJson("FilePath", "TagNamesCSV");
Stream.FileSystem.WriteTagsToFileCSV
string WriteTagsToFileCSV(string FilePath, string TagNamesCSV, bool Append, bool AddNewLine = false)
Write a number of tags values to file in CSV format.
Parameters
|
Parameter |
Description |
|
FilePath |
Full path of the file |
|
TagNamesCSV |
Names of the required tags separated by commas (example: Tag1,Tag2) |
|
Append |
False to override, True to append |
|
AddNewLine |
False to override, True to append |
Returns
string
Example
var result = Stream.FileSystem.WriteTagsToFileCSV("FilePath", "TagNamesCSV", true);
Stream.FileSystem.WriteTextToFile
string WriteTextToFile(string Path, string Content, bool Append, bool AddNewLine = false)
Write text to file.
Parameters
|
Parameter |
Description |
|
FilePath |
Full path of the file |
|
Content |
data to be written to file |
|
Append |
False to override, True to append |
|
AddNewLine |
False to override, True to append |
Returns
string
Example
var result = Stream.FileSystem.WriteTextToFile("Path", "Content", true);