Filer
Static Public Member Functions | List of all members
Executable Class Reference

A class to provide utility methods related to ELF executables and interpreted scripts. More...

#include <Executable.h>

Inheritance diagram for Executable:
Inheritance graph
[legend]
Collaboration diagram for Executable:
Collaboration graph
[legend]

Static Public Member Functions

static bool isExecutable (const QString &path)
 
static bool hasShebang (const QString &path)
 
static bool hasShebangOrIsElf (const QString &path)
 
static bool isElf (const QString &path)
 
static bool askUserToMakeExecutable (const QString &path)
 Ask the user if they want to make a file executable and perform the action if requested. More...
 

Detailed Description

A class to provide utility methods related to ELF executables and interpreted scripts.

Member Function Documentation

◆ 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
pathThe 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
pathThe 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
pathThe 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
pathThe 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
pathThe path to the file.
Returns
True if the file is executable, false otherwise.

The documentation for this class was generated from the following files: