format
typescript
FileStream.WriteAllString(val)class: FileStream
description
Writes the contents of the specified string to a file stream.
parameter
| param_name | type | description |
|---|---|---|
| val | string | The string to be written. |
reture
| type | description |
|---|---|
void |
code example
javascript
function Test(path: string) {
try {
let fileWrite = new FileStream(path, FileMode.OpenOrCreate, FileAccess.Write);
let str = "FileStream Write String";
fileWrite.WriteAllString(str);
fileWrite.Close();
} catch (error) {
Debug.Error(error);
}
}