Version: 3.1.0
filefn.h File Reference

Classes

class  wxPathList
 The path list is a convenient way of storing a number of directories, and when presented with a filename without a directory, searching for an existing file in those directories. More...
 

Macros

#define wxCHANGE_UMASK(mask)
 Under Unix this macro changes the current process umask to the given value, unless it is equal to -1 in which case nothing is done, and restores it to the original value on scope exit.
 

Typedefs

typedef off_t wxFileOffset
 The type used to store and provide byte offsets or byte sizes for files or streams.
 

Enumerations

enum  wxPosixPermissions {
  wxS_IRUSR = 00400,
  wxS_IWUSR = 00200,
  wxS_IXUSR = 00100,
  wxS_IRGRP = 00040,
  wxS_IWGRP = 00020,
  wxS_IXGRP = 00010,
  wxS_IROTH = 00004,
  wxS_IWOTH = 00002,
  wxS_IXOTH = 00001,
  wxPOSIX_USER_READ = wxS_IRUSR,
  wxPOSIX_USER_WRITE = wxS_IWUSR,
  wxPOSIX_USER_EXECUTE = wxS_IXUSR,
  wxPOSIX_GROUP_READ = wxS_IRGRP,
  wxPOSIX_GROUP_WRITE = wxS_IWGRP,
  wxPOSIX_GROUP_EXECUTE = wxS_IXGRP,
  wxPOSIX_OTHERS_READ = wxS_IROTH,
  wxPOSIX_OTHERS_WRITE = wxS_IWOTH,
  wxPOSIX_OTHERS_EXECUTE = wxS_IXOTH,
  wxS_DEFAULT,
  wxS_DIR_DEFAULT
}
 File permission bit names. More...
 
enum  wxSeekMode {
  wxFromStart,
  wxFromCurrent,
  wxFromEnd
}
 Parameter indicating how file offset should be interpreted. More...
 
enum  wxFileKind {
  wxFILE_KIND_UNKNOWN,
  wxFILE_KIND_DISK,
  wxFILE_KIND_TERMINAL,
  wxFILE_KIND_PIPE
}
 File kind enumerations returned from wxGetFileKind(). More...
 

Functions

bool wxGetDiskSpace (const wxString &path, wxLongLong total=NULL, wxLongLong free=NULL)
 This function returns the total number of bytes and number of free bytes on the disk containing the directory path (it should exist).
 
wxString wxGetOSDirectory ()
 Returns the Windows directory under Windows; other platforms return an empty string.
 
int wxParseCommonDialogsFilter (const wxString &wildCard, wxArrayString &descriptions, wxArrayString &filters)
 Parses the wildCard, returning the number of filters.
 
void wxDos2UnixFilename (wxChar *s)
 Converts a DOS to a Unix filename by replacing backslashes with forward slashes.
 
void wxUnix2DosFilename (wxChar *s)
 Converts a Unix to a DOS filename by replacing forward slashes with backslashes.
 
bool wxDirExists (const wxString &dirname)
 Returns true if dirname exists and is a directory.
 
void wxSplitPath (const wxString &fullname, wxString *path, wxString *name, wxString *ext)
 
time_t wxFileModificationTime (const wxString &filename)
 Returns time of last modification of given file.
 
bool wxRenameFile (const wxString &file1, const wxString &file2, bool overwrite=true)
 Renames file1 to file2, returning true if successful.
 
bool wxCopyFile (const wxString &file1, const wxString &file2, bool overwrite=true)
 Copies file1 to file2, returning true if successful.
 
bool wxFileExists (const wxString &filename)
 Returns true if the file exists and is a plain file.
 
bool wxMatchWild (const wxString &pattern, const wxString &text, bool dot_special)
 Returns true if the pattern matches the text; if dot_special is true, filenames beginning with a dot are not matched with wildcard characters.
 
wxString wxGetWorkingDirectory (char *buf=NULL, int sz=1000)
 
wxString wxPathOnly (const wxString &path)
 Returns the directory part of the filename.
 
bool wxIsWild (const wxString &pattern)
 Returns true if the pattern contains wildcards.
 
bool wxIsAbsolutePath (const wxString &filename)
 Returns true if the argument is an absolute filename, i.e. with a slash or drive name at the beginning.
 
wxString wxGetCwd ()
 Returns a string containing the current (or working) directory.
 
bool wxSetWorkingDirectory (const wxString &dir)
 Sets the current working directory, returning true if the operation succeeded.
 
bool wxConcatFiles (const wxString &file1, const wxString &file2, const wxString &file3)
 Concatenates file1 and file2 to file3, returning true if successful.
 
bool wxRemoveFile (const wxString &file)
 Removes file, returning true if successful.
 
bool wxMkdir (const wxString &dir, int perm=wxS_DIR_DEFAULT)
 Makes the directory dir, returning true if successful.
 
bool wxRmdir (const wxString &dir, int flags=0)
 Removes the directory dir, returning true if successful.
 
wxString wxFindNextFile ()
 Returns the next file that matches the path passed to wxFindFirstFile().
 
wxString wxFindFirstFile (const wxString &spec, int flags=0)
 This function does directory searching; returns the first file that matches the path spec, or the empty string.
 
wxFileKind wxGetFileKind (int fd)
 Returns the type of an open file.
 
wxFileKind wxGetFileKind (FILE *fp)
 
wxString wxFileNameFromPath (const wxString &path)
 
char * wxFileNameFromPath (char *path)
 
char * wxGetTempFileName (const wxString &prefix, char *buf=NULL)
 
bool wxGetTempFileName (const wxString &prefix, wxString &buf)
 

Variables

const int wxInvalidOffset = -1
 A special return value of many wxWidgets classes to indicate that an invalid offset was given.