forked from qt-creator/qt-creator
Lua: Add FilePath:isExecutableFile()
Change-Id: I1e0984d7cb0ccab6a0092019a3fe133de76c2c77 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -70,6 +70,8 @@ return {
|
||||
[](const FilePath &self) { return self.searchInPath(); },
|
||||
"exists",
|
||||
&FilePath::exists,
|
||||
"isExecutableFile",
|
||||
&FilePath::isExecutableFile,
|
||||
"dirEntries",
|
||||
[](sol::this_state s, const FilePath &p, sol::table options) -> sol::table {
|
||||
sol::state_view lua(s);
|
||||
|
||||
@@ -12,7 +12,6 @@ function utils.waitms(ms) end
|
||||
function utils.waitms_cb(ms, callback) end
|
||||
|
||||
---@class FilePath
|
||||
---@field exists boolean True if the path exists
|
||||
utils.FilePath = {}
|
||||
|
||||
---@param path string The path to convert
|
||||
@@ -38,6 +37,14 @@ function utils.FilePath:dirEntries(options) end
|
||||
---@return string
|
||||
function utils.FilePath:toUserOutput() end
|
||||
|
||||
---Returns whether the target exists
|
||||
---@return boolean
|
||||
function utils.FilePath:exists() end
|
||||
|
||||
---Returns whether the target is a file and executable
|
||||
---@return boolean
|
||||
function utils.FilePath:isExecutableFile() end
|
||||
|
||||
---Returns the path portion of FilePath as a string in the hosts native format
|
||||
---@return string
|
||||
function utils.FilePath:nativePath() end
|
||||
|
||||
Reference in New Issue
Block a user