Commits

Jason McKesson  committed a6f3c0c

Missed part of the external retrieval.

  • Participants
  • Parent commits e01ad89

Comments (0)

Files changed (1)

File _FindFileInPath.lua

+
+require("ex")
+require "ufs"
+
+function FindFileInPath(filename)
+	local path = ex.getenv("PATH");
+
+	for pathname in path:gmatch("([^%;%\"]+)%;?") do
+		pathname = ufs.path(pathname);
+		
+		local testName = pathname / filename;
+		
+		if(ufs.exists(testName)) then
+			return tostring(testName);
+		end
+	end
+	
+	return nil;
+end
+
+