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,
|
||||
"parentDir",
|
||||
&FilePath::parentDir,
|
||||
"suffix",
|
||||
&FilePath::suffix,
|
||||
"completeSuffix",
|
||||
&FilePath::completeSuffix,
|
||||
"isAbsolutePath",
|
||||
&FilePath::isAbsolutePath,
|
||||
"resolvePath",
|
||||
sol::overload(
|
||||
[](const FilePath &p, const QString &path) { return p.resolvePath(path); },
|
||||
|
@@ -70,4 +70,15 @@ function utils.FilePath:parentDir() end
|
||||
---@return FilePath The resolved path
|
||||
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
|
||||
|
Reference in New Issue
Block a user