54 #if defined(Q_C_CALLBACKS) 58 extern int qt_cmp_si(
const void *,
const void * );
60 #if defined(Q_C_CALLBACKS) 120 bool acceptAbsPaths )
123 #if defined(CHECK_NULL) 124 qWarning(
"QDir::rename: Empty or null file name(s)" );
146 if (
STAT(
".", &st ) == 0 ) {
152 qWarning(
"QDir::currentDirPath: getcwd() failed" );
156 qWarning(
"QDir::currentDirPath: stat(\".\") failed" );
174 return path[0] !=
'/';
178 int filterSpec,
int sortSpec )
194 bool doDirs = (filterSpec &
Dirs) != 0;
195 bool doFiles = (filterSpec &
Files) != 0;
196 bool noSymLinks = (filterSpec &
NoSymLinks) != 0;
197 bool doReadable = (filterSpec &
Readable) != 0;
198 bool doWritable = (filterSpec &
Writable) != 0;
199 bool doExecable = (filterSpec &
Executable) != 0;
200 bool doHidden = (filterSpec &
Hidden) != 0;
202 #if defined(_OS_OS2EMX_) 213 #if defined(CHECK_NULL) 214 qWarning(
"QDir::readDirEntries: Cannot read the directory: %s",
220 while ( (file = readdir(dir)) ) {
225 if ( (doDirs && fi.
isDir()) || (doFiles && fi.
isFile()) ) {
228 if ( (filterSpec &
RWEMask) != 0 )
233 if ( !doHidden && fn[0] ==
'.' &&
240 if ( closedir(dir) != 0 ) {
241 #if defined(CHECK_NULL) 242 qWarning(
"QDir::readDirEntries: Cannot close the directory: %s",
255 qsort( si, i,
sizeof(si[0]),
qt_cmp_si );
260 for ( j=0; j<i; j++ ) {
282 if ( !knownMemoryLeak ) {
288 return knownMemoryLeak;
static void slashify(QString &)
QString nameFilter() const
static bool match(const QStringList &filters, const QString &fileName)
Iterator append(const T &x)
static QString homeDirPath()
static const QFileInfoList * drives()
virtual QString dirName() const
int qt_cmp_si(const void *, const void *)
static bool isRelativePath(const QString &path)
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
void qWarning(const char *msg,...)
virtual bool isRoot() const
static QString fromLatin1(const char *, int len=-1)
QCString local8Bit() const
QInternalList< QFileInfo > QFileInfoList
virtual bool mkdir(const QString &dirName, bool acceptAbsPath=TRUE) const
void setFile(const QString &file)
virtual bool rename(const QString &name, const QString &newName, bool acceptAbsPaths=TRUE)
virtual bool readDirEntries(const QString &nameFilter, int FilterSpec, int SortSpec)
std::string getenv(std::string const &name)
static QString currentDirPath()
static QString rootDirPath()
void append(const type *d)
virtual QString canonicalPath() const
const char * data() const
static QCString encodeName(const QString &fileName)
static QString decodeName(const QCString &localFileName)
void setAutoDelete(bool enable)
virtual bool rmdir(const QString &dirName, bool acceptAbsPath=TRUE) const
QStringList qt_makeFilterList(const QString &filter)
virtual QString path() const
virtual QString filePath(const QString &fileName, bool acceptAbsPath=TRUE) const
bool isExecutable() const
The QFileInfo class provides system-independent file information.
def filters(nticks=9600, tick=0.5 *units.us, npitches=3000, pitch=1.0)
static bool setCurrent(const QString &path)
virtual bool isReadable() const