Version: 3.1.0
wxFSVolume Class Reference

#include <wx/volume.h>

Detailed Description

wxFSVolume represents a volume (also known as 'drive') in a file system under wxMSW.

Unix ports of wxWidgets do not have the concept of volumes and thus do not implement wxFSVolume.

Availability:  only available for the wxMSW port.

Library:  wxBase
Category:  Miscellaneous

Public Member Functions

 wxFSVolume ()
 Default ctor. More...
 
 wxFSVolume (const wxString &name)
 Create the volume object with the given name (which should be one of those returned by GetVolumes()). More...
 
bool Create (const wxString &name)
 Create the volume object with the given name (which should be one of those returned by GetVolumes()). More...
 
bool IsOk () const
 Is this a valid volume? More...
 
wxFSVolumeKind GetKind () const
 Returns the kind of this volume. More...
 
int GetFlags () const
 Returns the flags of this volume. More...
 
bool IsWritable () const
 Returns true if this volume is writable. More...
 
wxString GetName () const
 Returns the name of the volume; this is the internal name for the volume used by the operating system. More...
 
wxString GetDisplayName () const
 Returns the name of the volume meant to be shown to the user. More...
 
wxIcon GetIcon (wxFSIconType type) const
 This function is available only when wxUSE_GUI is 1. More...
 

Static Public Member Functions

static wxArrayString GetVolumes (int flagsSet=wxFS_VOL_MOUNTED, int flagsUnset=0)
 Returns an array containing the names of the volumes of this system. More...
 
static void CancelSearch ()
 Stops execution of GetVolumes() called previously (should be called from another thread, of course). More...
 

Constructor & Destructor Documentation

wxFSVolume::wxFSVolume ( )

Default ctor.

Use Create() later.

wxFSVolume::wxFSVolume ( const wxString name)

Create the volume object with the given name (which should be one of those returned by GetVolumes()).

Member Function Documentation

static void wxFSVolume::CancelSearch ( )
static

Stops execution of GetVolumes() called previously (should be called from another thread, of course).

bool wxFSVolume::Create ( const wxString name)

Create the volume object with the given name (which should be one of those returned by GetVolumes()).

wxString wxFSVolume::GetDisplayName ( ) const

Returns the name of the volume meant to be shown to the user.

int wxFSVolume::GetFlags ( ) const

Returns the flags of this volume.

See wxFSVolumeFlags enumeration values.

wxIcon wxFSVolume::GetIcon ( wxFSIconType  type) const

This function is available only when wxUSE_GUI is 1.

Returns the icon used by the native toolkit for the given file system type.

wxFSVolumeKind wxFSVolume::GetKind ( ) const

Returns the kind of this volume.

wxString wxFSVolume::GetName ( ) const

Returns the name of the volume; this is the internal name for the volume used by the operating system.

static wxArrayString wxFSVolume::GetVolumes ( int  flagsSet = wxFS_VOL_MOUNTED,
int  flagsUnset = 0 
)
static

Returns an array containing the names of the volumes of this system.

Only the volumes with flags such that the expression

(flags & flagsSet) == flagsSet && !(flags & flagsUnset)

is true, are returned. By default, all mounted ones are returned. See wxFSVolumeFlags enumeration values for a list of valid flags.

This operation may take a while and, even if this function is synchronous, it can be stopped using CancelSearch().

bool wxFSVolume::IsOk ( ) const

Is this a valid volume?

bool wxFSVolume::IsWritable ( ) const

Returns true if this volume is writable.