$#include "FileSystem.h" static const unsigned SCAN_FILES; static const unsigned SCAN_DIRS; static const unsigned SCAN_HIDDEN; class FileSystem : public Object { bool SetCurrentDir(const String pathName); bool CreateDir(const String pathName); int SystemCommand(const String commandLine); // int SystemRun(const String fileName, const Vector& arguments); bool SystemOpen(const String fileName, const String mode = String::EMPTY); bool Copy(const String srcFileName, const String destFileName); bool Rename(const String srcFileName, const String destFileName); bool Delete(const String fileName); void RegisterPath(const String pathName); String GetCurrentDir() const; bool HasRegisteredPaths() const; bool CheckAccess(const String pathName) const; unsigned GetLastModifiedTime(const String fileName) const; bool FileExists(const String fileName) const; bool DirExists(const String pathName) const; Vector ScanDir(const String pathName, const String filter, unsigned flags, bool recursive) const; String GetProgramDir() const; String GetUserDocumentsDir() const; }; String GetPath(const String fullPath); String GetFileName(const String fullPath); String GetExtension(const String fullPath, bool lowercaseExtension = true); String GetFileNameAndExtension(const String fullPath, bool lowercaseExtension = false); String ReplaceExtension(const String fullPath, const String newExtension); String AddTrailingSlash(const String pathName); String RemoveTrailingSlash(const String pathName); String GetParentPath(const String pathName); String GetInternalPath(const String pathName); String GetNativePath(const String pathName); bool IsAbsolutePath(const String pathName); ${ #define TOLUA_DISABLE_tolua_IOLuaAPI_FileSystem_ScanDir00 static int tolua_IOLuaAPI_FileSystem_ScanDir00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"const FileSystem",0,&tolua_err) || !tolua_isurho3dstring(tolua_S,2,0,&tolua_err) || !tolua_isurho3dstring(tolua_S,3,0,&tolua_err) || !tolua_isnumber(tolua_S,4,0,&tolua_err) || !tolua_isboolean(tolua_S,5,0,&tolua_err) || !tolua_isnoobj(tolua_S,6,&tolua_err) ) goto tolua_lerror; else #endif { const FileSystem* self = (const FileSystem*) tolua_tousertype(tolua_S,1,0); const String pathName = ((const String) tolua_tourho3dstring(tolua_S,2,0)); const String filter = ((const String) tolua_tourho3dstring(tolua_S,3,0)); unsigned flags = ((unsigned) tolua_tonumber(tolua_S,4,0)); bool recursive = ((bool) tolua_toboolean(tolua_S,5,0)); #ifndef TOLUA_RELEASE if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ScanDir'", NULL); #endif { Vector tolua_ret; self->ScanDir(tolua_ret, pathName,filter,flags,recursive); tolua_pushurho3dstringvector(tolua_S, tolua_ret); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'ScanDir'.",&tolua_err); return 0; #endif } $}