Functions
qfile_win32.cpp File Reference
#include "qglobal.h"
#include "qfile.h"
#include "qfiledefs_p.h"

Go to the source code of this file.

Functions

static void reslashify (QString &n)
 
bool qt_file_access (const QString &fn, int t)
 

Function Documentation

bool qt_file_access ( const QString fn,
int  t 
)

Definition at line 46 of file qfile_win32.cpp.

47 {
48  if ( fn.isEmpty() )
49  return FALSE;
50 #if defined(__CYGWIN32_)
51  return ACCESS( QFile::encodeName(fn), t ) == 0;
52 #else
53  QString str = fn;
54  reslashify(str);
55  return ( _waccess( (wchar_t*) str.ucs2(), t ) == 0 );
56 #endif
57 }
static void reslashify(QString &n)
Definition: qfile_win32.cpp:37
bool isEmpty() const
Definition: qstring.h:682
const bool FALSE
Definition: qglobal.h:370
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
QAsciiDict< Entry > fn
const unsigned short * ucs2() const
Definition: qstring.cpp:12092
static QCString encodeName(const QString &fileName)
Definition: qfile.cpp:494
#define ACCESS
Definition: qfiledefs_p.h:216
static QCString str
static void reslashify ( QString n)
static

Definition at line 37 of file qfile_win32.cpp.

38 {
39  for ( int i=0; i<(int)n.length(); i++ )
40  {
41  if ( n[i] == '/' )
42  n[i] = '\\';
43  }
44 }
uint length() const
Definition: qstring.h:679