A class to provide utility methods related to ELF executables and interpreted scripts.
More...
#include <Executable.h>
A class to provide utility methods related to ELF executables and interpreted scripts.
◆ askUserToMakeExecutable()
bool Executable::askUserToMakeExecutable |
( |
const QString & |
path | ) |
|
|
static |
Ask the user if they want to make a file executable and perform the action if requested.
This method displays a dialog asking the user if they want to make the specified file executable. If the user agrees, the file's permissions are modified accordingly.
- Parameters
-
path | The path to the file. |
- Returns
- True if the file is now executable or already executable, false otherwise. If an error occurs during permission modification, false is returned as well.
◆ hasShebang()
bool Executable::hasShebang |
( |
const QString & |
path | ) |
|
|
static |
Check if a file has a shebang line.
- Parameters
-
path | The path to the file. |
- Returns
- True if the file has a shebang, false otherwise.
◆ hasShebangOrIsElf()
bool Executable::hasShebangOrIsElf |
( |
const QString & |
path | ) |
|
|
static |
Check if a file has a shebang line or is an ELF executable.
- Parameters
-
path | The path to the file. |
- Returns
- True if the file has a shebang or is an ELF, false otherwise.
◆ isElf()
bool Executable::isElf |
( |
const QString & |
path | ) |
|
|
static |
Check if a file is an ELF executable.
- Parameters
-
path | The path to the file. |
- Returns
- True if the file is an ELF, false otherwise.
◆ isExecutable()
bool Executable::isExecutable |
( |
const QString & |
path | ) |
|
|
static |
Check if a file is executable.
- Parameters
-
path | The path to the file. |
- Returns
- True if the file is executable, false otherwise.
The documentation for this class was generated from the following files: