{"id":17531515,"url":"https://github.com/takumakume/mruby-file-access","last_synced_at":"2025-03-22T00:20:32.890Z","repository":{"id":103595814,"uuid":"95393799","full_name":"takumakume/mruby-file-access","owner":"takumakume","description":"accsess(2) for mruby. This is a fast file check method.","archived":false,"fork":false,"pushed_at":"2018-02-13T04:12:00.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-26T18:34:21.005Z","etag":null,"topics":["access","mruby"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/takumakume.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":"2017-06-26T00:32:20.000Z","updated_at":"2017-06-26T06:59:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f47b984-85fb-4402-8a8a-2aa92282f3d1","html_url":"https://github.com/takumakume/mruby-file-access","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takumakume%2Fmruby-file-access","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takumakume%2Fmruby-file-access/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takumakume%2Fmruby-file-access/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takumakume%2Fmruby-file-access/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takumakume","download_url":"https://codeload.github.com/takumakume/mruby-file-access/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244886542,"owners_count":20526450,"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":["access","mruby"],"created_at":"2024-10-20T17:24:52.391Z","updated_at":"2025-03-22T00:20:32.859Z","avatar_url":"https://github.com/takumakume.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mruby-file-access   [![Build Status](https://travis-ci.org/takumakume/mruby-file-access.svg?branch=master)](https://travis-ci.org/takumakume/mruby-file-access)\n\naccsess(2) for mruby.\n\nThis is a fast file check method.\n\n## install by mrbgems\n\n- add conf.gem line to `build_config.rb`\n\n```ruby\nMRuby::Build.new do |conf|\n\n    # ... (snip) ...\n\n    conf.gem :github =\u003e 'takumakume/mruby-file-access'\nend\n```\n## methods\n\n```ruby\nFile::Access.exist?(pathname) # or File::Access.exists?(pathname)\nFile::Access.readable?(pathname)\nFile::Access.writable?(pathname)\nFile::Access.executable?(pathname)\n```\n\n## benchmark\n\n- using stat(2)\n\n  ```ruby\n  1000000.times do\n    File.exist?(\"samplefile\")\n  end\n  ```\n\n  ```shell\n  # time mruby stat.rb\n  mruby stat.rb  1.53s user 0.31s system 99% cpu 1.857 total\n  ```\n\n- using access(2)\n\n  ```ruby\n  1000000.times do\n    File::Access.exist?(\"samplefile\")\n  end\n  ```\n\n  ```sh\n  # time mruby access.rb\n  mruby access.rb  0.61s user 0.40s system 98% cpu 1.026 total\n  ```\n\n## License\n\nunder the MIT License:\n- see LICENSE file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakumakume%2Fmruby-file-access","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakumakume%2Fmruby-file-access","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakumakume%2Fmruby-file-access/lists"}