KListOpenFilesJob Class
Provides information about processes that have open files in a given path or subdirectory of path. More...
Header: | #include <KListOpenFilesJob> |
CMake: | find_package(KF6 REQUIRED COMPONENTS CoreAddons) target_link_libraries(mytarget PRIVATE KF6::CoreAddons) |
Since: | 5.63 |
Inherits: | KJob |
Public Types
enum class | Error { NotSupported, InternalError, DoesNotExist } |
Public Functions
KProcessList::KProcessInfoList | processInfoList() const |
Detailed Description
When start() is invoked it starts to collect information about processes that have any files open in path or a subdirectory of path. When it is done the KJob::result signal is emitted and the result can be retrieved with the processInfoList function.
On Unix like systems the lsof utility is used to get the list of processes. On Windows the listing always fails with error code NotSupported.
Member Type Documentation
enum class KListOpenFilesJob::Error
Special error codes emitted by KListOpenFilesJob
The KListOpenFilesJob uses the error codes defined here besides the standard error codes defined by KJob
Constant | Value | Description |
---|---|---|
KListOpenFilesJob::Error::NotSupported | KJob::UserDefinedError + 1 | Indicates that the platform doesn't support listing open files by processes |
KListOpenFilesJob::Error::InternalError | KJob::UserDefinedError + 2 | Internal error has ocurred |
KListOpenFilesJob::Error::DoesNotExist | KJob::UserDefinedError + 11 | The specified path does not exist |
Member Function Documentation
KProcessList::KProcessInfoList KListOpenFilesJob::processInfoList() const
Returns the list of processes with open files for the requested path
Returns The list of processes with open files for the requested path