createFile

From GTA Connected
(Redirected from CreateFile)
Jump to: navigation, search

Function Server and Client All Games Online and Offline

Server 1.0.0, Client 1.0.0

Description

The createFile function is used to create a file on the hard drive.

Parameters

Type Name Presence Default Value Description
string filePath required n/a The path to the file.

Returns

Success Returns

Type Description
Stream A handle to the file stream.

Failure Returns

Type Value
null n/a

Notes

There aren't any notes for this function.

Examples

Example 1 - JavaScript:

file = createFile("test.txt")
file.writeString("this is a test")
file.close()


Example 2 - Lua:

file = createFile("test.txt")
file:writeString("this is a test")
file:close()

Compatibility

There isn't any compatibility information for this function.

Related

Server Related

createFile
openFile


Client Related

createFile
openFile