Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QFileSystem Class Reference
[QtBaseModule]

The QFileSystem class describes a single mount point. More...

    #include <QFileSystem>

Public Functions

Static Public Members


Detailed Description

The QFileSystem class describes a single mount point.

This class is an informational result structure returned by the QStorageMetaInfo class. This class should not be created directly, but should rather be used in tandem with the QStorageMetaInfo class.


Member Function Documentation

QFileSystem::QFileSystem ()

Construct an empty QFileSystem object.

QFileSystem::QFileSystem ( const QFileSystem & other )

Construct a copy of other.

QFileSystem::~QFileSystem ()

Destroys this QFileSystem object.

bool QFileSystem::applications () const

Returns flag indicating if the file system can contain applications.

QFileSystem QFileSystem::applicationsFileSystem ()   [static]

Returns the QFileSystem which contains the default application storage path.

The default application storage path can be obtained by calling QFileSystem::applicationsFileSystem().applicationsPath().

See also applicationsPath().

const QString & QFileSystem::applicationsPath () const

Returns the path of the applications directory, eg. /home/Applications.

long QFileSystem::availBlocks () const

Returns the number of available blocks on the file system

long QFileSystem::blockSize () const

Returns the size of each block on the file system.

void QFileSystem::connect () const

Connects the filesystem to the content system by sending the QCop message QPE/QStorage::mounting(QString).

Note: This call is asynchronous. QStorageMetaInfo will emit the disksChanged() signal once the filesystem has been connected.

See also isConnected() and QStorageMetaInfo::disksChanged().

bool QFileSystem::contentDatabase () const

Returns flag indicating if the file system has it's own content database stored.

void QFileSystem::disconnect () const

Disconnects the filesystem from the content system by sending the QCop message QPE/QStorage::unmounting(QString).

Note: This call is asynchronous. QStorageMetaInfo will emit the disksChanged() signal once the filesystem has been disconnected.

See also isConnected() and QStorageMetaInfo::disksChanged().

const QString & QFileSystem::disk () const

Returns the file system name, eg. /dev/hda3

bool QFileSystem::documents () const

Returns flag indicating if the file system can contain documents.

QFileSystem QFileSystem::documentsFileSystem ()   [static]

Returns the QFileSystem which contains the default document storage path.

The default document storage path can be obtained by calling QFileSystem::documentsFileSystem().documentsPath().

See also documentsPath().

const QString & QFileSystem::documentsPath () const

Returns the path of the documents directory, eg. /home/Documents.

QFileSystem QFileSystem::fromFileName ( const QString & fileName, bool connectedOnly = true )   [static]

Returns a QFileSystem object describing the file system on which the file with the name fileName is located.

If connectedOnly is true the QFileSystem will only be returned if it is currently connected.

bool QFileSystem::isConnected () const

Returns flag indicating if the file system is currently connected.

See also connect() and disconnect().

bool QFileSystem::isMounted () const

Returns true if the filesystem is mounted.

See also mount() and unmount().

bool QFileSystem::isNull () const

Returns true if the QFileSystem is unitialised.

bool QFileSystem::isRemovable () const

Returns flag indicating if the file system can be removed. For example, a CF card would be removable, but the internal memory would not.

bool QFileSystem::isWritable () const

Returns flag indicating if the file system is mounted as writable or read-only. Returns false if read-only, true if read and write.

bool QFileSystem::mount () const

Mounts the filesystem. Returns true on success, false otherwise. Returns false if the filesystem is already mounted.

The filesystem must have a corresponding entry in the /etc/fstab file. The mount point directory must exist.

After the filesystem is sucessfully mounted it should be connected to the content system by calling connect().

See also unmount() and connect().

const QString & QFileSystem::name () const

Returns the translated, human readable name for the mount directory.

const QString & QFileSystem::options () const

Returns the mount options

const QString & QFileSystem::path () const

Returns the mount path, eg. /home

const QString & QFileSystem::prevPath () const

Returns the previous mount path, eg. /home This is useful when a filesystem has been unmounted.

bool QFileSystem::storesType ( const QString & type ) const

Returns true if the file system can store files of type.

The path of these files is given by typePath().

long QFileSystem::totalBlocks () const

Returns the total number of blocks on the file system

QFileSystem QFileSystem::typeFileSystem ( const QString & type )   [static]

Returns the QFileSystem that is the default storage location for files of type.

QString QFileSystem::typePath ( const QString & type ) const

Returns the path for files of type stored on a filesystem.

If no path is defined this returns the root path of the filesystem.

The return value of this is only valid if storesType() returns true.

bool QFileSystem::unmount () const

Unmounts the filesystem from the system. Returns true on success, false otherwise. Returns false if the filesystem is already unmounted.

The filesystem must have previously been disconnected from the content system with disconnect().

See also mount() and disconnect().

QFileSystem & QFileSystem::operator= ( const QFileSystem & other )

Assign the contents of other to this object.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 64
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le blog Digia au hasard

Logo

Déploiement d'applications Qt Commercial sur les tablettes Windows 8

Le blog Digia est l'endroit privilégié pour la communication sur l'édition commerciale de Qt, où des réponses publiques sont apportées aux questions les plus posées au support. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web