createFile

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

Function Server and Client icon-iii.png icon-vc.png icon-sa.png icon-iv.png Online and Offline

Available since Server 1.0.0, Client 1.0.0

Stream createFile(string filePath)

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

Parameters

1) string filePath The path to the file.

Return

Stream A handle to the file stream.

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

icon-iii.png icon-vc.png icon-sa.png icon-iv.png createFile
icon-iii.png icon-vc.png icon-sa.png icon-iv.png fileExists
icon-iii.png icon-vc.png icon-sa.png icon-iv.png loadTextFile
icon-iii.png icon-vc.png icon-sa.png icon-iv.png openFile
icon-iii.png icon-vc.png icon-sa.png icon-iv.png saveTextFile


Client Related

icon-iii.png icon-vc.png icon-sa.png icon-iv.png createFile
icon-iii.png icon-vc.png icon-sa.png icon-iv.png fileExists
icon-iii.png icon-vc.png icon-sa.png icon-iv.png loadTextFile
icon-iii.png icon-vc.png icon-sa.png icon-iv.png openFile
icon-iii.png icon-vc.png icon-sa.png icon-iv.png saveTextFile