LuaFileSystem

Post here if you have some suggestions or you want to request a new feature.
Post Reply
chazjn
Posts: 6
Joined: Wed Sep 24, 2014 11:30 am

LuaFileSystem

Post by chazjn »

Hello,

Could you please provide a complied version of the LuaFileSystem library?
https://github.com/keplerproject/luafilesystem" rel="nofollow

Many thanks,

Chaz
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: LuaFileSystem

Post by FTP »

OK, you can download the compiled version of the LuaFileSystem library here:

https://github.com/luapower/lfs" rel="nofollow
DomDis
Posts: 33
Joined: Sat Mar 18, 2023 7:44 pm

Re: LuaFileSystem

Post by DomDis »

FTP wrote: Tue Nov 24, 2015 7:15 am OK, you can download the compiled version of the LuaFileSystem library here:

https://github.com/luapower/lfs" rel="nofollow
I too am interested in LFS so i can run the following script how do I add this to WFTP?


require "lfs"

function dirtree(dir)
assert(dir and dir ~= "", "directory parameter is missing or empty")
if string.sub(dir, -1) == "/" then
dir=string.sub(dir, 1, -2)
end

local function yieldtree(dir)
for entry in lfs.dir(dir) do
if entry ~= "." and entry ~= ".." then
entry=dir.."/"..entry
local attr=lfs.attributes(entry)
coroutine.yield(entry,attr)
if attr.mode == "directory" then
yieldtree(entry)
end
end
end
end

return coroutine.wrap(function() yieldtree(dir) end)
end

-- example
for filename, attr in dirtree("/FTP/FTP-Repo/") do
print(attr.mode, filename)
end
DomDis
Posts: 33
Joined: Sat Mar 18, 2023 7:44 pm

Re: LuaFileSystem

Post by DomDis »

FTP wrote: Tue Nov 24, 2015 7:15 am OK, you can download the compiled version of the LuaFileSystem library here:

https://github.com/luapower/lfs" rel="nofollow
Sorry to post on such an old topic BUT I tried running a script that need LFS and its not found. I see the comment on Here; are the executives but there is no mention on how to install

any assistance is appreciated
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: LuaFileSystem

Post by FTP »

Already answered you in this thread: viewtopic.php?p=8330
Post Reply