wxWidgets: wxFSVolume Class Reference

| Version: 3.1.7

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
wxFSVolume Class Reference
Class List by Category » Miscellaneous

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.1/wxWidgets3.1-3.1.7-1.x86_64/src/wxWidgets-3.1.7/interface/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, wxOSX/Cocoa ports.

##

Library: wxBase
Category: Miscellaneous

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

## 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.
static void | CancelSearch ()
| Stops execution of GetVolumes() called previously (should be called from another thread, of course).

## Constructor & Destructor Documentation

## ◆ wxFSVolume() [1/2]

wxFSVolume::wxFSVolume | ( |  | ) |

Default ctor.

Use Create() later.

## ◆ wxFSVolume() [2/2]

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

## ◆ CancelSearch()

void wxFSVolume::CancelSearch | ( |  | ) |
| static

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

## ◆ Create()

bool wxFSVolume::Create | ( | const wxString & | name | ) |

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

## ◆ GetDisplayName()

wxString wxFSVolume::GetDisplayName | ( |  | ) | const

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

## ◆ GetFlags()

int wxFSVolume::GetFlags | ( |  | ) | const

Returns the flags of this volume.

See wxFSVolumeFlags enumeration values.

## ◆ GetIcon()

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.

Availability: only available for the wxMSW port.

## ◆ GetKind()

wxFSVolumeKind wxFSVolume::GetKind | ( |  | ) | const

Returns the kind of this volume.

## ◆ GetName()

wxString wxFSVolume::GetName | ( |  | ) | const

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

## ◆ GetVolumes()

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().

## ◆ IsOk()

bool wxFSVolume::IsOk | ( |  | ) | const

Is this a valid volume?

## ◆ IsWritable()

bool wxFSVolume::IsWritable | ( |  | ) | const

Returns true if this volume is writable.