{"id":22971480,"url":"https://github.com/vorgestern/luafpp","last_synced_at":"2025-04-02T06:17:17.472Z","repository":{"id":264099237,"uuid":"892352027","full_name":"vorgestern/LuaFPP","owner":"vorgestern","description":"Lua-Binding for C++ std::filesystem","archived":false,"fork":false,"pushed_at":"2025-01-30T23:57:26.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T20:45:30.204Z","etag":null,"topics":["binding","cpp","filesystem","lua"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vorgestern.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-22T00:26:20.000Z","updated_at":"2025-01-30T23:57:29.000Z","dependencies_parsed_at":"2025-01-29T00:26:40.323Z","dependency_job_id":"ee8c45dc-cbcf-436c-bf2e-855f748a9f0a","html_url":"https://github.com/vorgestern/LuaFPP","commit_stats":null,"previous_names":["vorgestern/luafpp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vorgestern%2FLuaFPP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vorgestern%2FLuaFPP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vorgestern%2FLuaFPP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vorgestern%2FLuaFPP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vorgestern","download_url":"https://codeload.github.com/vorgestern/LuaFPP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246763899,"owners_count":20829800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binding","cpp","filesystem","lua"],"created_at":"2024-12-14T22:17:49.805Z","updated_at":"2025-04-02T06:17:17.455Z","avatar_url":"https://github.com/vorgestern.png","language":"C++","readme":"\n# Purpose\nExpose the functions and types of C++ std::filesystem to Lua scripts.\u003cbr/\u003e\nProvide source with zero config and zero #ifdef.\n\n# Examples\n\n    fpp=require \"luafpp\"\n    print(\"Use luafpp version\", fpp.version)\n    print(\"Working directory\", fpp.pwd())\n    local here=fpp.pwd()\n    fpp.cd \"..\"\n    print(\"Parent directory\", fpp.pwd())\n    fpp.cd(here)\n    local tree=fpp.walkdir \".\"\n    for j,e in ipairs(tree) do print(j,e.type, e.abspath) end\n\n# Requirements\n+ C++ 20\n+ Lua 5.4\n\n# How to build\n## Linux\n\n    make\n\ncreates luafpp.so.\nCopy to where Lua will find it with 'require luafpp'\n\n# How to use: First ..\n    local fpp=require \"luafpp\"\n\n## Directories\nThese do what you would expect:\n\n    fpp.pwd()                               returns current directory\n    local ok,err=fpp.cd \".local/demo\"       changes current directory\n    if not ok then print(err) end\n    local ok,err=fpp.mkdir \".local/empty\"   creates a directory\n    if not ok then print(err) end\n    local ok,err=fpp.rmdir \".local/empty\"   deletes empty directory\n    if not ok then print(err) end\n    local ok=X.rmrf \".local/various\"        true if file/folder existed, false (not nil) if not\n    local ok,err=fpp.rmrf \".local/empty\"    equivalent of `rm -rf`\n    if not ok then print(err) end\n    local dirs,err=fpp.subdirs \".local\"     returns a list of subdirectories\n    if not dirs then print(err)\n    else for _,p in ipairs(dirs) do ...\n    end\n    assert(X.exists \"hier\")                 Check whether directory exists (true/nil)\n\n## Files\nThese do what you would expect:\n\n    local ok,err=fpp.touch \".local/demo/main.cpp\"           Touch/create file\n    if not ok then print(err) end\n    local s,err=fpp.filesize \".local/demo/main.cpp\"         Query file size in bytes\n    if not s then print(err) end\n    local t,err=fpp.type \".local/demo/main.cpp\"             Query file type (\"file\", \"dir)\n    if not s then print(err) end\n    local p,err=fpp.permissions \".local/demo/main.cpp\"      Query file permissions ()\n    if not p then print(err) end\n    local l,err=fpp.numlink \".local/demo/main.cpp\"          Query number or links ()\n    if not p then print(err) end\n    assert(X.exists \"hier/Makefile\")                        Check whether file exists (true/nil)\n\n## Paths\nThese are more difficult to describe than to implement:\n\n    fpp.absolute\n    fpp.relative\n    fpp.canonical\n    fpp.weakly_canonical\n\n## Walking directories\n\n    fpp.walkdir(\".local\", \"rN\", nil)\n\n# To do\n\n- Come up with a better representation of file type.\n- Introduce callbacks to filter walking recursion.\n- Introduce postprocessing utilities for output from walking directories.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvorgestern%2Fluafpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvorgestern%2Fluafpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvorgestern%2Fluafpp/lists"}