diff options
Diffstat (limited to 'xmake/core/base/path.lua')
| -rw-r--r-- | xmake/core/base/path.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/core/base/path.lua b/xmake/core/base/path.lua index 0248fed67..9dc2ecd7d 100644 --- a/xmake/core/base/path.lua +++ b/xmake/core/base/path.lua @@ -106,6 +106,14 @@ function _instance:extension() return path.extension(self:str()) end +function _instance:startswith(prefix) + return self:str():startswith(tostring(prefix)) +end + +function _instance:endswith(suffix) + return self:str():endswith(tostring(suffix)) +end + function _instance:directory() return path.new(path.directory(self:str()), self._TRANSFORM) end |
