FileSystem

class sys.FileSystemAvailable in neko, php, cppThis class allows you to get information about files and directories. static function createDirectory( path : String ) : VoidCreates the named directory. Not recursive : the parent directory must exist. static function deleteDirectory( path : String ) : VoidDeletes the named directory. static function deleteFile( path : String ) : VoidDeletes the named file. static function exists( path : String ) : BoolChecks if the named file or directory exists, and returns true if the file system object exists, otherwise returns false. static function fullPath( relpath : String ) : StringReturns the full path for the named file system object given the path relative to the current working directory. static function isDirectory( path : String ) : BoolChecks if the named file system object is a directory. Throws an exception if the named object does not exist or is not accessible. static function readDirectory( path : String ) : Array<String>Returns all the files/directories stored in the named directory. static function rename( path : String, newpath : String ) : VoidRenames and/or moves the named file or directory to the new name or directory. static function stat( path : String ) : FileStatReturns information for the named file/directory.
version #15304, modified 2012-08-08 22:22:18 by hbatra
2 comments
  • Oct 26, 2012 at 01:25

    Note: fullPath() isn't a safe operation. If the path doesn't exist, it will throw and exception.

  • Oct 26, 2012 at 01:26

    For the Neko target, I should clarify. Not sure about the others.