QFileSystemWatcher Class ReferenceThe QFileSystemWatcher class provides an interface for monitoring files and directories for modifications. More... #include <QFileSystemWatcher> Inherits: QObject. Note: All functions in this class are reentrant. This class was introduced in Qt 4.2. Public Functions
Signals
Additional Inherited Members
Detailed DescriptionThe QFileSystemWatcher class provides an interface for monitoring files and directories for modifications. QFileSystemWatcher monitors the file system for changes to files and directories by watching a list of specified paths. Call addPath() to watch a particular file or directory. Multiple paths can be added using the addPaths() function. Existing paths can be removed by using the removePath() and removePaths() functions. QFileSystemWatcher examines each path added to it. Files that have been added to the QFileSystemWatcher can be accessed using the files() function, and directories using the directories() function. The fileChanged() signal is emitted when a file has been modified, renamed or removed from disk. Similarly, the directoryChanged() signal is emitted when a directory or its contents is modified or removed. Note that QFileSystemWatcher stops monitoring files once they have been renamed or removed from disk, and directories once they have been removed from disk. Note: On systems running a Linux kernel without inotify support, file systems that contain watched paths cannot be unmounted. Note: Windows CE does not support directory monitoring by default as this depends on the file system driver installed. Note: The act of monitoring files and directories for modifications consumes system resources. This implies there is a limit to the number of files and directories your process can monitor simultaneously. On Mac OS X 10.4 and all BSD variants, for example, an open file descriptor is required for each monitored file. Some system limits the number of open file descriptors to 256 by default. This means that addPath() and addPaths() will fail if your process tries to add more than 256 files or directories to the file system monitor. Also note that your process may have other file descriptors open in addition to the ones for files being monitored, and these other open descriptors also count in the total. Mac OS X 10.5 and up use a different backend and do not suffer from this issue. Member Function Documentation
|
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 4.8 | |
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 ! |
Copyright © 2000-2012 - www.developpez.com