{"id":17861218,"url":"https://github.com/jonathanstowe/io-path-mode","last_synced_at":"2025-04-02T20:47:25.798Z","repository":{"id":66980408,"uuid":"49227889","full_name":"jonathanstowe/IO-Path-Mode","owner":"jonathanstowe","description":"Augment Raku's IO::Path to provide a mode method.","archived":false,"fork":false,"pushed_at":"2022-08-07T08:46:51.000Z","size":29,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-04-22T17:06:59.623Z","etag":null,"topics":["file","mode","raku","rakudo"],"latest_commit_sha":null,"homepage":"","language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonathanstowe.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"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":"2016-01-07T20:08:13.000Z","updated_at":"2022-08-12T10:03:55.000Z","dependencies_parsed_at":"2023-05-16T10:30:33.288Z","dependency_job_id":null,"html_url":"https://github.com/jonathanstowe/IO-Path-Mode","commit_stats":null,"previous_names":[],"tags_count":9,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FIO-Path-Mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FIO-Path-Mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FIO-Path-Mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FIO-Path-Mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanstowe","download_url":"https://codeload.github.com/jonathanstowe/IO-Path-Mode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246892796,"owners_count":20850846,"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":["file","mode","raku","rakudo"],"created_at":"2024-10-28T08:43:23.359Z","updated_at":"2025-04-02T20:47:25.486Z","avatar_url":"https://github.com/jonathanstowe.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IO::Path::Mode\n\nAugment Raku's IO::Path with a .mode() method to get the file mode\n\n![Build Status](https://github.com/jonathanstowe/IO-Path-Mode/workflows/CI/badge.svg)\n\n\n## Synopsis\n\n```raku\n\nuse IO::Path::Mode;\n\nmy $mode = \"some-file\".IO.mode;\n\nsay $mode.set-user-id ?? 'setuid' !! 'not setuid';\n\nsay $mode.user.execute ?? 'executable' !! 'not executable';\n\nsay $mode.file-type == IO::Path::Mode::File ?? 'file' !! 'something other than a normal file';\n\n...\n\n\n```\n\n## Description\n\nThis augments the type ```IO::Path``` to provide a ```.mode``` method\nthat allows you to get at the file permissions (or mode.)  It follows\nthe POSIX model pf user, group and other permissions and consequently\nmay not make a meaningful result on e.g. Windows (although the underlying\ncalls appear to return something approximating the correct answer.)\n\nIf you have a more recent rakudo that provides a ```mode``` method, it\nwill replace that method with one that returns an ```IO::Path::Mode```\nobject rather than an ```IntStr```, this is a transitional arrangement\nand will be deprecated in a future release in favour of a different\nmethod name.\n\nIt relies on some non-specified functionality in the VM so may probably\nonly work with Rakudo on MoarVM.\n\nThis is mostly provided as some relief for not having the functionality\ndirectly exposed in Rakudo and as a discussion board for the best way\nof implementing the functionality going forward.\n\n## Installation\n\nAssuming you have a working Rakudo installation you should be able to install this with *zef* :\n\n    # From the source directory\n   \n    zef install .\n\n    # Remote installation\n\n    zef install IO::Path::Mode\n\n\n## Support\n\nI welcome suggestions, patches and bug reports at https://github.com/jonathanstowe/IO-Path-Mode/issues\n\nI'd be particularly interested in suggestions relating to making\nthe mode mutable and adding a multi candidate for 'chmod' that\ncan take an ```IO::Path::Mode``` object.\n\n## Licence\n\nThis is free software.\n\nPlease see the [LICENCE](LICENCE) file in the distribution\n\n© Jonathan Stowe 2016 - 2021\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanstowe%2Fio-path-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanstowe%2Fio-path-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanstowe%2Fio-path-mode/lists"}