{"id":13699737,"url":"https://github.com/moteus/lua-path","last_synced_at":"2025-04-15T11:32:09.806Z","repository":{"id":7226356,"uuid":"8534297","full_name":"moteus/lua-path","owner":"moteus","description":"File system path manipulation library","archived":false,"fork":false,"pushed_at":"2021-01-07T13:28:11.000Z","size":231,"stargazers_count":77,"open_issues_count":4,"forks_count":19,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-01T10:42:38.249Z","etag":null,"topics":["filesystem","lua"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moteus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-03T09:26:50.000Z","updated_at":"2024-10-08T12:09:50.000Z","dependencies_parsed_at":"2022-09-21T07:49:23.654Z","dependency_job_id":null,"html_url":"https://github.com/moteus/lua-path","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moteus%2Flua-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moteus%2Flua-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moteus%2Flua-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moteus%2Flua-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moteus","download_url":"https://codeload.github.com/moteus/lua-path/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223673048,"owners_count":17183618,"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":["filesystem","lua"],"created_at":"2024-08-02T20:00:42.648Z","updated_at":"2024-11-08T11:01:50.768Z","avatar_url":"https://github.com/moteus.png","language":"Lua","readme":"# lua-path\n\n[![Licence](http://img.shields.io/badge/Licence-MIT-brightgreen.svg)](LICENCE.txt)\n[![Build Status](https://travis-ci.org/moteus/lua-path.png?branch=master)](https://travis-ci.org/moteus/lua-path)\n[![Build Status](https://ci.appveyor.com/api/projects/status/okrhcb519rldjhn4?svg=true)](https://ci.appveyor.com/project/moteus/lua-path)\n[![Coverage Status](https://coveralls.io/repos/moteus/lua-path/badge.png)](https://coveralls.io/r/moteus/lua-path)\n\n## Documentation\n\n[View entire documentation here](http://moteus.github.io/path/index.html)\n\n## Usage\n```lua\nlocal PATH = require \"path\"\n\n-- suppose we run on windows\nassert(PATH.IS_WINDOWS)\n\n-- we can use system dependet function\nprint(PATH.user_home())  -- C:\\Documents and Settings\\Admin\nprint(PATH.currentdir()) -- C:\\lua\\5.1\n\n-- but we can use specific system path notation\nlocal ftp_path = PATH.new('/')\nprint(ftp_path.join(\"/root\", \"some\", \"dir\")) -- /root/some/dir\n\n-- All functions specific to system will fail\nassert(not pcall( ftp_path.currentdir ) )\n```\n\n```lua\n-- clean currentdir\n\nlocal path = require \"path\"\npath.each(\"./*\", function(P, mode)\n  if mode == 'directory' then \n    path.rmdir(P)\n  else\n    path.remove(P)\n  end\nend,{\n  param = \"fm\";   -- request full path and mode\n  delay = true;   -- use snapshot of directory\n  recurse = true; -- include subdirs\n  reverse = true; -- subdirs at first \n})\n```\n\n","funding_links":[],"categories":["Bibliotecas","Filesystem","Lua","Resources"],"sub_categories":["File system and OS"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoteus%2Flua-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoteus%2Flua-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoteus%2Flua-path/lists"}