new_file


The new_file creator function is a non-class version of the CFile:new method which creates and returns a new CFile object. If the object cannot be created, nil is returned. As an alternative to using this constructor followed by the Open method, you can use the global new_fileopen method to construct the CFile object and open the file in a specific access mode.

Example

The following script gets the path name for a file and

sFname = GetFileName()

-- return the full path name of the file

F = new_file()

-- open the file and create a CFile object

if not F then Exit("File not found") end

 

Related Topics

CFile class

new_fileopen


Mira Pro x64 Script User's Guide, v.8.77 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.