[bt-devel] Windows Build status

Eeli Kaikkonen eekaikko at mail.student.oulu.fi
Tue Feb 24 05:51:19 MST 2009


Quoting "Troy A. Griffitts" <scribe at crosswire.org>:

> I realize it might make more sense to just use QDir, but we have
> services in FileMgr to do most everything you need in a platform
> agnostic way:
>
> static signed char existsFile(const char *ipath, const char *ifileName = 0);
> static signed char existsDir(const char *ipath, const char *idirName = 0);
> static char isDirectory(const char *path);
> static int createParent(const char *pName);
> static int createPathAndFile(const char *fName);
> static int openFileReadOnly(const char *fName);
> static int copyFile(const char *srcFile, const char *destFile);
> static int copyDir(const char *srcDir, const char *destDir);
> static int removeDir(const char *targetDir);
> static int removeFile(const char *fName);
>
> If they're useful for you.
>

That's true, I noticed in one place that it was easier to use the  
sword function than Qt class. But it would be even better if the  
library had "isModuleRemovable" and "isDestinationWritable" functions.  
The ideal implementation would check the whole tree (mods.d/,  
modules/* and all the files of a module). These are needed to check  
whether the given destination path is writable and whether a module  
can be uninstalled. This has been a problem for the frontends.

This is not directly related to dirent.h but is offtopic.


--Eeli Kaikkonen




More information about the bt-devel mailing list