| Version: 3.3.1

Classes | Enumerations | Variables
filename.h File Reference

## Classes
class | wxFileName
| wxFileName encapsulates a file name. More...

## Enumerations
enum | wxPathFormat { wxPATH_NATIVE = 0 , wxPATH_UNIX , wxPATH_BEOS = wxPATH_UNIX , wxPATH_MAC , wxPATH_DOS , wxPATH_WIN = wxPATH_DOS , wxPATH_OS2 = wxPATH_DOS , wxPATH_VMS , wxPATH_MAX }
| The various values for the path format: this mainly affects the path separator but also whether or not the path has the drive part (as under Windows). More...
enum | wxSizeConvention { wxSIZE_CONV_TRADITIONAL , wxSIZE_CONV_IEC , wxSIZE_CONV_SI }
| Different conventions for human readable sizes. More...
enum | wxPathNormalize { wxPATH_NORM_ENV_VARS = 0x0001 , wxPATH_NORM_DOTS = 0x0002 , wxPATH_NORM_TILDE = 0x0004 , wxPATH_NORM_CASE = 0x0008 , wxPATH_NORM_ABSOLUTE = 0x0010 , wxPATH_NORM_LONG = 0x0020 , wxPATH_NORM_SHORTCUT = 0x0040 , wxPATH_NORM_ALL = 0x00ff & ~wxPATH_NORM_CASE }
| The kind of normalization to do with the file name: these values can be or'd together to perform several operations at once. More...
enum | { wxPATH_RMDIR_FULL = 1 , wxPATH_RMDIR_RECURSIVE = 2 }
| Flags for wxFileName::Rmdir(). More...
enum | { wxFILE_EXISTS_REGULAR = 0x0001 , wxFILE_EXISTS_DIR = 0x0002 , wxFILE_EXISTS_SYMLINK = 0x1004 , wxFILE_EXISTS_DEVICE = 0x0008 , wxFILE_EXISTS_FIFO = 0x0016 , wxFILE_EXISTS_SOCKET = 0x0032 , wxFILE_EXISTS_NO_FOLLOW }
| Flags for wxFileName::Exists(). More...

## Variables
wxULongLong | wxInvalidSize
| The return value of wxFileName::GetSize() in case of error. More...

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Flags for wxFileName::Rmdir().

Enumerator
wxPATH_RMDIR_FULL | Delete the specified directory and its subdirectories if they are empty.
wxPATH_RMDIR_RECURSIVE | Delete the specified directory and all the files and subdirectories in it recursively. This flag is obviously dangerous and should be used with care and after asking the user for confirmation.

## ◆ anonymous enum

anonymous enum

Flags for wxFileName::Exists().

Since
  2.9.5

Enumerator
wxFILE_EXISTS_REGULAR | Check for existence of a regular file.
wxFILE_EXISTS_DIR | Check for existence of a directory.
wxFILE_EXISTS_SYMLINK | Check for existence of a symlink. Notice that this flag also sets wxFILE_EXISTS_NO_FOLLOW, otherwise it would never be satisfied as wxFileName::Exists() would be checking for the existence of the symlink target and not the symlink itself.
wxFILE_EXISTS_DEVICE | Check for existence of a device.
wxFILE_EXISTS_FIFO | Check for existence of a FIFO.
wxFILE_EXISTS_SOCKET | Check for existence of a socket.
wxFILE_EXISTS_NO_FOLLOW | Don't dereference a contained symbolic link. Check for existence of anything

## ◆ wxPathFormat

enum wxPathFormat

The various values for the path format: this mainly affects the path separator but also whether or not the path has the drive part (as under Windows).

See wxFileName for more info.

Enumerator
wxPATH_NATIVE | the path format for the current platform.
wxPATH_UNIX |
wxPATH_BEOS |
wxPATH_MAC |
wxPATH_DOS |
wxPATH_WIN |
wxPATH_OS2 |
wxPATH_VMS |
wxPATH_MAX | Not a valid value for specifying path format.

## ◆ wxPathNormalize

enum wxPathNormalize

The kind of normalization to do with the file name: these values can be or'd together to perform several operations at once.

See wxFileName::Normalize() for more info.

Enumerator
wxPATH_NORM_ENV_VARS | Replace environment variables with their values. wxFileName understands both Unix and Windows (but only under Windows) environment variables expansion: i.e. `"$var"`, `"$(var)"` and `"${var}"` are always understood and in addition under Windows `"%var%"` is also. Note that when this flag is used, dollar or percent signs may be escaped with backslashes to prevent them from being used for the variable expansion, meaning that normalizing any path with a directory starting with a dollar sign under Windows can give unexpected results, as normalizing `c:\foo\$bar` results in `c:\foo$bar`. Because of this, using this flag with arbitrary paths is not recommended.
wxPATH_NORM_DOTS | Squeeze all `".."` and `"."`.
wxPATH_NORM_TILDE | Replace `"~"` and `"~user"` (Unix only).
wxPATH_NORM_CASE | If the platform is case insensitive, make lowercase the path.
wxPATH_NORM_ABSOLUTE | Make the path absolute.
wxPATH_NORM_LONG | Expand the path to the "long" form under Windows. This flag converts DOS short paths in 8.3 format to long form under Windows and does nothing under the other platforms. It is mostly irrelevant nowadays as short paths are not used any longer in practice. Notice that it only works for the existing file paths. See also wxFileName::GetLongPath()
wxPATH_NORM_SHORTCUT | Resolve the shortcut, if it is a shortcut (Windows only).
wxPATH_NORM_ALL | Flags used by wxFileName::Normalize() by default. This includes all normalization flags except for `wxPATH_NORM_CASE` and notably does include `wxPATH_NORM_ENV_VARS` which may yield unexpected results, as described above. Because of this, this flag is deprecated and shouldn't be used in the new code and the existing code should be reviewed to check if expanding environment variables is really needed.

## ◆ wxSizeConvention

enum wxSizeConvention

Different conventions for human readable sizes.

See also
  wxFileName::GetHumanReadableSize().

Since
  2.9.1

Enumerator
wxSIZE_CONV_TRADITIONAL | 1024 bytes = 1KB.
wxSIZE_CONV_IEC | 1024 bytes = 1KiB.
wxSIZE_CONV_SI | 1000 bytes = 1KB.

## Variable Documentation

## ◆ wxInvalidSize

wxULongLong wxInvalidSize

The return value of wxFileName::GetSize() in case of error.