/* (C) 2003 XDA Developers * Author: Willem Jan Hengeveld * Web: http://www.xda-developers.com/ * * $Header$ */ #ifndef __FILEUTILS_H_ #include using namespace std; #include "stringutils.h" typedef enum { FS_DIRECTORY, FS_FILE, FS_NOTFOUND, FS_NOACCESS } FileState; FileState GetFileState(const string &filename); bool FileExists(const string &filename); bool CopyFile(const string &sourcefile, const string &destinationfile); bool ReadFileLines(const string &filename, StringList& lines); bool MakeLink(const string &linkname, const string &contents); bool RenameFile(const string &originalname, const string &newname); bool DeleteFile(const string &filename); string ConcatPaths(const string& path1, const string& path2); bool ParseFilename(const string& fullpath, string& path, string& filename); #define __FILEUTILS_H_ #endif