Welcome to mirror list, hosted at ThFree Co, Russian Federation.

fpath.lua - github.com/torch/sys.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9e4854c72ff364e806a920d4eca8a7ba3f9db23a (plain)
1
2
3
4
5
6
7
8
9
10
--------------------------------------------------------------------------------
-- always returns the path of the file running
--------------------------------------------------------------------------------
local function fpath()
   local fpath = _G.debug.getinfo(2).source:gsub('@','')
   if fpath:find('/') ~= 1 then fpath = paths.concat(paths.cwd(),fpath) end
   return paths.dirname(fpath),paths.basename(fpath)
end

return fpath