forked from qt-creator/qt-creator
Utils: Introduce a FilePath::refersToExecutableFile
... to avoid the need in user code to care for .exe and .bat suffixes. Change-Id: Ic249f14273f72c663912482555f98be1af923823 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -396,6 +396,16 @@ bool FilePath::isExecutableFile() const
|
||||
return fileAccess()->isExecutableFile(*this);
|
||||
}
|
||||
|
||||
/// \returns a bool indicating on whether a process with this FilePath's
|
||||
/// .nativePath() is likely to start.
|
||||
///
|
||||
/// This is equivalent to \c isExecutableFile() in general.
|
||||
/// On Windows, it will check appending various suffixes, too.
|
||||
bool FilePath::refersToExecutableFile(MatchScope matchScope) const
|
||||
{
|
||||
return fileAccess()->refersToExecutableFile(*this, matchScope);
|
||||
}
|
||||
|
||||
bool FilePath::isReadableFile() const
|
||||
{
|
||||
return fileAccess()->isReadableFile(*this);
|
||||
|
||||
Reference in New Issue
Block a user