new_file


The new_file 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 FileOpen method to both construct the CFile object and open the file.

Example

F = new_file()

-- create a new instance of F of the CFile class.

  ...

-- other uses of the class go here, before delete.

F:delete()

-- deletes the object and its associated memory.

Related Topics

CFile class, new, delete, FileOpen


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