forked from qt-creator/qt-creator
Lua: Add FilePath::(complete)Suffix and isAbsolute
Change-Id: Ifc9cc97b5c996a2bee8cd15d158411306dc3bd7d Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -119,6 +119,12 @@ void addUtilsModule()
|
|||||||
&FilePath::currentWorkingPath,
|
&FilePath::currentWorkingPath,
|
||||||
"parentDir",
|
"parentDir",
|
||||||
&FilePath::parentDir,
|
&FilePath::parentDir,
|
||||||
|
"suffix",
|
||||||
|
&FilePath::suffix,
|
||||||
|
"completeSuffix",
|
||||||
|
&FilePath::completeSuffix,
|
||||||
|
"isAbsolutePath",
|
||||||
|
&FilePath::isAbsolutePath,
|
||||||
"resolvePath",
|
"resolvePath",
|
||||||
sol::overload(
|
sol::overload(
|
||||||
[](const FilePath &p, const QString &path) { return p.resolvePath(path); },
|
[](const FilePath &p, const QString &path) { return p.resolvePath(path); },
|
||||||
|
@@ -70,4 +70,15 @@ function utils.FilePath:parentDir() end
|
|||||||
---@return FilePath The resolved path
|
---@return FilePath The resolved path
|
||||||
function utils.FilePath:resolveSymlinks() end
|
function utils.FilePath:resolveSymlinks() end
|
||||||
|
|
||||||
|
---Returns the suffix of the path (e.g. "test.ui.qml" -> ".qml")
|
||||||
|
---@return string
|
||||||
|
function utils.FilePath:suffix() end
|
||||||
|
|
||||||
|
---Returns the complete suffix of the path (e.g. "test.ui.qml" -> "ui.qml")
|
||||||
|
---@return string
|
||||||
|
function utils.FilePath:completeSuffix() end
|
||||||
|
|
||||||
|
---Returns whether the path is absolute
|
||||||
|
---@return boolean
|
||||||
|
function utils.FilePath:isAbsolutePath() end
|
||||||
return utils
|
return utils
|
||||||
|
Reference in New Issue
Block a user