Game Development Reference
In-Depth Information
os.difftime ( t2, t1 )
This function returns the difference in the number of seconds between t2 and t1 .
os.execute ( [command] )
This function is the equivalent of the C system command. It executes the command passed in
the OS shell. It also returns the status code, which is very much system dependent. This is not
applicable on iOS, as it would be sandboxed and not execute.
os.exit ( )
exit , which terminates the application. Though this works on iOS
os.remove ( filename )
This function deletes a filename or directory with the given name. The directories are removed if they
are empty. If the function fails, it returns nil and a string describing the error. This will work only on
the directories and files that you can work with (i.e., the ones in the Documents directory on an iOS
device). The other directories are sandboxed and unavailable.
os.rename ( oldname, newname )
This function renames a file or directory with the given oldname to the newname . If the function fails, it
returns nil and a string describing the error. This works only with files in the Documents directory.
Note The reason this works with files in the Documents directory is that most of the other directories
are sandboxed or restricted from use. Any command that tries accessing the restricted directories will
fail and do nothing.
os.setlocale ( locale [,category] )
This function is not available in the context of iOS devices.
 
 
Search WWH ::




Custom Search