Skip to content

format

typescript
new FileStream ((path, mode, access))

description

Create a file stream.

You need to specify the file path, the file mode to open, and the file access permission.

parameter

param_nametypedescription
pathstringThe file path.
modeFileModeThe mode to open the file.
accessFileAccess?The access permission to the file.

code example

javascript
function Test(path: string) {  
    let file = new FileStream(path, FileMode.OpenOrCreate, FileAccess.Write);   
    file.Close();  
}