We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7db41f commit 5bcb9b8Copy full SHA for 5bcb9b8
1 file changed
lua/plenary/path.lua
@@ -918,4 +918,16 @@ function Path:readbyterange(offset, length)
918
return data
919
end
920
921
+function Path:find_upwards(filename)
922
+ local folder = Path:new(self)
923
+ while self:absolute() ~= path.root do
924
+ local p = folder:joinpath(filename)
925
+ if p:exists() then
926
+ return p
927
+ end
928
+ folder = folder:parent()
929
930
+ return ""
931
+end
932
+
933
return Path
0 commit comments