ManaPlus
|
Functions | |
File * | openInternal (FsEntry *const entry, const std::string &filename, const char *mode) |
File * | openRead (FsEntry *const entry, std::string filename) |
File * | openWrite (FsEntry *const entry, const std::string &filename) |
File * | openAppend (FsEntry *const entry, const std::string &filename) |
void | deinit () |
void | init (const std::string &name) |
void | initFuncs (FsFuncs *const ptr) |
FsFuncs * | getFuncs () |
const char * | getBaseDir () |
const char * | getUserDir () |
bool | getRealDir (FsEntry *const entry, std::string filename, std::string dirName, std::string &realDir) |
bool | exists (FsEntry *const entry, std::string fileName, std::string dirName) |
void | enumerate (FsEntry *const entry, std::string dirName, StringVect &names) |
bool | isDirectory (FsEntry *const entry, std::string dirName, bool &isDirFlag) |
bool | isSymbolicLink (std::string name) |
void | freeList (List *const handle) |
bool | setWriteDir (std::string newDir) |
bool | mkdir (std::string dirname) |
bool | remove (std::string filename) |
void | permitLinks (const bool val) |
int | close (File *const file) |
int64_t | read (File *const file, void *const buffer, const uint32_t objSize, const uint32_t objCount) |
int64_t | write (File *const file, const void *const buffer, const uint32_t objSize, const uint32_t objCount) |
int64_t | fileLength (File *const file) |
int64_t | tell (File *const file) |
int | seek (File *const file, const uint64_t pos) |
int | eof (File *const file) |
const char * | loadFile (FsEntry *const entry, std::string filename, int &fileSize) |
void | getFiles (FsEntry *const entry, std::string dirName, StringVect &names) |
void | getFilesWithDir (FsEntry *const entry, const std::string &dirName, StringVect &names) |
void | getDirs (FsEntry *const entry, std::string dirName, StringVect &names) |
int32_t | rwops_seek (SDL_RWops *const rw, const int32_t offset, const int whence) |
int | rwops_read (SDL_RWops *const rw, void *const ptr, const int size, const int maxnum) |
int | rwops_write (SDL_RWops *const rw, const void *const ptr, const int size, const int maxnum) |
int | rwops_close (SDL_RWops *const rw) |
int VirtFs::FsDir::close | ( | File *const | file | ) |
Definition at line 312 of file fsdir.cpp.
Referenced by initFuncs().
void VirtFs::FsDir::deinit | ( | ) |
void VirtFs::FsDir::enumerate | ( | FsEntry *const | entry, |
std::string | dirName, | ||
StringVect & | names | ||
) |
Definition at line 192 of file fsdir.cpp.
References FOR_EACH, and VirtFs::anonymous_namespace{fsdir.cpp}::mPermitLinks.
Referenced by initFuncs().
int VirtFs::FsDir::eof | ( | File *const | file | ) |
Definition at line 436 of file fsdir.cpp.
References FILEHDEFAULT, FILEHTYPE, fileLength(), and reportAlways.
Referenced by initFuncs().
bool VirtFs::FsDir::exists | ( | FsEntry *const | entry, |
std::string | fileName, | ||
std::string | dirName | ||
) |
Definition at line 184 of file fsdir.cpp.
References Files::existsLocal(), and fileName.
Referenced by initFuncs().
int64_t VirtFs::FsDir::fileLength | ( | File *const | file | ) |
Definition at line 368 of file fsdir.cpp.
References FILEHDEFAULT, FILEHTYPE, and reportAlways.
Referenced by eof(), and initFuncs().
void VirtFs::FsDir::freeList | ( | List *const | handle | ) |
const char * VirtFs::FsDir::getBaseDir | ( | ) |
Definition at line 160 of file fsdir.cpp.
References VirtFs::anonymous_namespace{fsdir.cpp}::mBaseDir.
Referenced by VirtFs::getBaseDir().
void VirtFs::FsDir::getDirs | ( | FsEntry *const | entry, |
std::string | dirName, | ||
StringVect & | names | ||
) |
Definition at line 636 of file fsdir.cpp.
References FOR_EACH, VirtFs::anonymous_namespace{fsdir.cpp}::mPermitLinks, and pathJoin().
Referenced by initFuncs().
void VirtFs::FsDir::getFiles | ( | FsEntry *const | entry, |
std::string | dirName, | ||
StringVect & | names | ||
) |
Definition at line 536 of file fsdir.cpp.
References FOR_EACH, VirtFs::anonymous_namespace{fsdir.cpp}::mPermitLinks, and pathJoin().
Referenced by initFuncs().
void VirtFs::FsDir::getFilesWithDir | ( | FsEntry *const | entry, |
const std::string & | dirName, | ||
StringVect & | names | ||
) |
Definition at line 586 of file fsdir.cpp.
References FOR_EACH, VirtFs::anonymous_namespace{fsdir.cpp}::mPermitLinks, and pathJoin().
Referenced by initFuncs().
FsFuncs * VirtFs::FsDir::getFuncs | ( | ) |
Definition at line 155 of file fsdir.cpp.
References VirtFs::anonymous_namespace{fsdir.cpp}::funcs.
Referenced by VirtFs::mountDirInternal().
bool VirtFs::FsDir::getRealDir | ( | FsEntry *const | entry, |
std::string | filename, | ||
std::string | dirName, | ||
std::string & | realDir | ||
) |
Definition at line 170 of file fsdir.cpp.
References Files::existsLocal(), VirtFs::DirEntry::rootSubDir, and VirtFs::DirEntry::userDir.
Referenced by initFuncs().
const char * VirtFs::FsDir::getUserDir | ( | ) |
Definition at line 165 of file fsdir.cpp.
References VirtFs::anonymous_namespace{fsdir.cpp}::mUserDir.
Referenced by VirtFs::getUserDir().
void VirtFs::FsDir::init | ( | const std::string & | name | ) |
Definition at line 115 of file fsdir.cpp.
References VirtFs::anonymous_namespace{fsdir.cpp}::funcs, getFileDir(), getHomePath(), getRealPath(), initFuncs(), VirtFs::anonymous_namespace{fsdir.cpp}::mBaseDir, VirtFs::anonymous_namespace{fsdir.cpp}::mUserDir, and prepareFsPath().
Referenced by VirtFs::init().
void VirtFs::FsDir::initFuncs | ( | FsFuncs *const | ptr | ) |
Definition at line 126 of file fsdir.cpp.
References close(), enumerate(), eof(), exists(), fileLength(), getDirs(), getFiles(), getFilesWithDir(), getRealDir(), isDirectory(), loadFile(), openAppend(), openRead(), openWrite(), read(), rwops_close(), rwops_read(), rwops_seek(), rwops_write(), seek(), tell(), and write().
Referenced by init().
bool VirtFs::FsDir::isDirectory | ( | FsEntry *const | entry, |
std::string | dirName, | ||
bool & | isDirFlag | ||
) |
bool VirtFs::FsDir::isSymbolicLink | ( | std::string | name | ) |
Definition at line 250 of file fsdir.cpp.
References checkPath(), VirtFs::anonymous_namespace{fsdir.cpp}::mPermitLinks, prepareFsPath(), and reportAlways.
Referenced by VirtFs::isSymbolicLink().
const char * VirtFs::FsDir::loadFile | ( | FsEntry *const | entry, |
std::string | filename, | ||
int & | fileSize | ||
) |
Definition at line 466 of file fsdir.cpp.
References CAST_S32, CAST_SIZE, Files::existsLocal(), FILECLOSE, FILEHDEFAULT, FILEHTYPE, FILEOPEN, FILEOPEN_FLAG_READ, Logger::log(), logger, read(), reportAlways, restrict, VirtFs::DirEntry::rootSubDir, and VirtFs::DirEntry::userDir.
Referenced by initFuncs().
bool VirtFs::FsDir::mkdir | ( | std::string | dirname | ) |
Definition at line 285 of file fsdir.cpp.
References mkdir_r(), VirtFs::anonymous_namespace{fsdir.cpp}::mWriteDir, prepareFsPath(), and reportAlways.
Referenced by VirtFs::mkdir().
Definition at line 95 of file fsdir.cpp.
References FILEOPEN_FLAG_APPEND, and openInternal().
Referenced by initFuncs().
File * VirtFs::FsDir::openInternal | ( | FsEntry *const | entry, |
const std::string & | filename, | ||
const char * | mode | ||
) |
Definition at line 64 of file fsdir.cpp.
References Files::existsLocal(), FILEHDEFAULT, FILEHTYPE, FILEOPEN, VirtFs::anonymous_namespace{fsdir.cpp}::funcs, and reportAlways.
Referenced by openAppend(), openRead(), and openWrite().
Definition at line 83 of file fsdir.cpp.
References FILEOPEN_FLAG_READ, and openInternal().
Referenced by initFuncs().
Definition at line 89 of file fsdir.cpp.
References FILEOPEN_FLAG_WRITE, and openInternal().
Referenced by initFuncs().
void VirtFs::FsDir::permitLinks | ( | const bool | val | ) |
Definition at line 307 of file fsdir.cpp.
References VirtFs::anonymous_namespace{fsdir.cpp}::mPermitLinks.
Referenced by VirtFs::permitLinks().
int64_t VirtFs::FsDir::read | ( | File *const | file, |
void *const | buffer, | ||
const uint32_t | objSize, | ||
const uint32_t | objCount | ||
) |
Definition at line 320 of file fsdir.cpp.
References FILEHDEFAULT, FILEHTYPE, and reportAlways.
Referenced by initFuncs(), loadFile(), and rwops_read().
bool VirtFs::FsDir::remove | ( | std::string | filename | ) |
Definition at line 296 of file fsdir.cpp.
References VirtFs::anonymous_namespace{fsdir.cpp}::mWriteDir, prepareFsPath(), and reportAlways.
Referenced by VirtFs::remove().
int VirtFs::FsDir::rwops_close | ( | SDL_RWops *const | rw | ) |
int VirtFs::FsDir::rwops_read | ( | SDL_RWops *const | rw, |
void *const | ptr, | ||
const int | size, | ||
const int | maxnum | ||
) |
Definition at line 160 of file fsdirrwops.cpp.
References CAST_S32, FILEHTYPE, VirtFs::File::mFd, read(), reportAlways, and EmoteDB::size().
Referenced by initFuncs().
int32_t VirtFs::FsDir::rwops_seek | ( | SDL_RWops *const | rw, |
const int32_t | offset, | ||
const int | whence | ||
) |
Definition at line 41 of file fsdirrwops.cpp.
References Logger::assertLog(), CAST_S32, FILEHTYPE, FILESEEK, logger, VirtFs::File::mFd, reportAlways, and RWOPSINT.
Referenced by initFuncs().
int VirtFs::FsDir::rwops_write | ( | SDL_RWops *const | rw, |
const void *const | ptr, | ||
const int | size, | ||
const int | maxnum | ||
) |
Definition at line 196 of file fsdirrwops.cpp.
References CAST_S32, FILEHTYPE, VirtFs::File::mFd, reportAlways, EmoteDB::size(), and write().
Referenced by initFuncs().
int VirtFs::FsDir::seek | ( | File *const | file, |
const uint64_t | pos | ||
) |
Definition at line 418 of file fsdir.cpp.
References FILEHDEFAULT, FILEHTYPE, FILESEEK, and reportAlways.
Referenced by initFuncs().
bool VirtFs::FsDir::setWriteDir | ( | std::string | newDir | ) |
Definition at line 276 of file fsdir.cpp.
References dirSeparator, findLast(), VirtFs::anonymous_namespace{fsdir.cpp}::mWriteDir, prepareFsPath(), and STD_MOVE.
Referenced by VirtFs::setWriteDir().
int64_t VirtFs::FsDir::tell | ( | File *const | file | ) |
Definition at line 400 of file fsdir.cpp.
References FILEHDEFAULT, FILEHTYPE, and reportAlways.
Referenced by initFuncs().
int64_t VirtFs::FsDir::write | ( | File *const | file, |
const void *const | buffer, | ||
const uint32_t | objSize, | ||
const uint32_t | objCount | ||
) |
Definition at line 344 of file fsdir.cpp.
References FILEHDEFAULT, FILEHTYPE, and reportAlways.
Referenced by initFuncs(), and rwops_write().