Skip to content
/ fsys Public

Filesystem library implementation for lua (C++)

Notifications You must be signed in to change notification settings

AOSXAP/fsys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Fsys

Filesystem library implementation for lua

Still in early stages

Ref: https://en.cppreference.com/w/cpp/filesystem

Contributing

Contributions are always welcome!

See list.txt to get started.

Implement any feature (or fix existing ones) , modify core.cpp and send a pull request.

Use

  • Compile via command: g++ ./core.cpp -I/usr/include/lua5.4 -llua5.4 -fPIC -shared -o fsys.so (or whatever your lua version is)
  • file.lua code:
local fsys = require("fsys");

e = fsys.scan("./test_dir"); 

function scan(e, padding)
    for k, v in pairs(e) do 
        for i = 0 , padding - 1 do 
            io.write("\t")
        end
        io.write(v, '\n')

        if(fsys.is_dir(v) == true) then
            q = fsys.scan(v); 
            scan(q , padding + 1)    
        end

    end
end

scan(e, 0)