{"id":13706008,"url":"https://github.com/r-lib/fs","last_synced_at":"2026-03-06T00:12:30.547Z","repository":{"id":27511692,"uuid":"114168421","full_name":"r-lib/fs","owner":"r-lib","description":"Provide cross platform file operations based on libuv.","archived":false,"fork":false,"pushed_at":"2026-03-03T20:35:30.000Z","size":16648,"stargazers_count":380,"open_issues_count":68,"forks_count":82,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-03-03T21:36:55.263Z","etag":null,"topics":["filesystem","libuv","r"],"latest_commit_sha":null,"homepage":"https://fs.r-lib.org/","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/r-lib.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-12-13T21:01:16.000Z","updated_at":"2026-03-03T20:32:51.000Z","dependencies_parsed_at":"2024-06-18T15:36:26.982Z","dependency_job_id":"786f38d2-9968-4a0b-baa9-f8028d6f716c","html_url":"https://github.com/r-lib/fs","commit_stats":{"total_commits":4669,"total_committers":381,"mean_commits":"12.254593175853019","dds":0.7504819019061898,"last_synced_commit":"714990b50a9c8e2a9cae8bf6364c91636a712279"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/r-lib/fs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Ffs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Ffs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Ffs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Ffs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r-lib","download_url":"https://codeload.github.com/r-lib/fs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Ffs/sbom","scorecard":{"id":756765,"data":{"date":"2025-08-11","repo":{"name":"github.com/r-lib/fs","commit":"0d261dd965404cb02ab57788f4437fa057a9e0a3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/pkgdown.yaml:24","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/pr-commands.yaml:19","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/pr-commands.yaml:58","Info: topLevel permissions set to 'read-all': .github/workflows/R-CMD-check.yaml:14","Warn: no topLevel permission defined: .github/workflows/dragonflybsd.yaml:1","Warn: no topLevel permission defined: .github/workflows/freebsd.yaml:1","Warn: no topLevel permission defined: .github/workflows/netbsd.yaml:1","Warn: no topLevel permission defined: .github/workflows/openbsd.yaml:1","Info: topLevel permissions set to 'read-all': .github/workflows/pkgdown.yaml:13","Info: topLevel permissions set to 'read-all': .github/workflows/pr-commands.yaml:9","Warn: no topLevel permission defined: .github/workflows/rhub.yaml:1","Info: topLevel permissions set to 'read-all': .github/workflows/test-coverage.yaml:10"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":8,"reason":"Found 8/10 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/R-CMD-check.yaml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/R-CMD-check.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/R-CMD-check.yaml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/R-CMD-check.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/R-CMD-check.yaml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/R-CMD-check.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/R-CMD-check.yaml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/R-CMD-check.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/R-CMD-check.yaml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/R-CMD-check.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dragonflybsd.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/dragonflybsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dragonflybsd.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/dragonflybsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dragonflybsd.yaml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/dragonflybsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dragonflybsd.yaml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/dragonflybsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dragonflybsd.yaml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/dragonflybsd.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dragonflybsd.yaml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/dragonflybsd.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/freebsd.yaml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/freebsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/freebsd.yaml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/freebsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/freebsd.yaml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/freebsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/freebsd.yaml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/freebsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/freebsd.yaml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/freebsd.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/freebsd.yaml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/freebsd.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/netbsd.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/netbsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/netbsd.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/netbsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/netbsd.yaml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/netbsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/netbsd.yaml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/netbsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/netbsd.yaml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/netbsd.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/netbsd.yaml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/netbsd.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/openbsd.yaml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/openbsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/openbsd.yaml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/openbsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/openbsd.yaml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/openbsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/openbsd.yaml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/openbsd.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/openbsd.yaml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/openbsd.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/openbsd.yaml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/openbsd.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pkgdown.yaml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/pkgdown.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pkgdown.yaml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/pkgdown.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pkgdown.yaml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/pkgdown.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pkgdown.yaml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/pkgdown.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pkgdown.yaml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/pkgdown.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr-commands.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/pr-commands.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr-commands.yaml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/pr-commands.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr-commands.yaml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/pr-commands.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr-commands.yaml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/pr-commands.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr-commands.yaml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/pr-commands.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr-commands.yaml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/pr-commands.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr-commands.yaml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/pr-commands.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr-commands.yaml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/pr-commands.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr-commands.yaml:83: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/pr-commands.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rhub.yaml:79: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/rhub.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rhub.yaml:80: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/rhub.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rhub.yaml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/rhub.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rhub.yaml:88: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/rhub.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rhub.yaml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/rhub.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rhub.yaml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/rhub.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rhub.yaml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/rhub.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rhub.yaml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/rhub.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rhub.yaml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/rhub.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rhub.yaml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/rhub.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-coverage.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/test-coverage.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test-coverage.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/test-coverage.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test-coverage.yaml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/test-coverage.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test-coverage.yaml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/test-coverage.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-coverage.yaml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/r-lib/fs/test-coverage.yaml/main?enable=pin","Info:   0 out of  14 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  44 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T21:53:55.747Z","repository_id":27511692,"created_at":"2025-08-22T21:53:55.747Z","updated_at":"2025-08-22T21:53:55.747Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30156262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"ssl_error","status_checked_at":"2026-03-05T22:39:24.771Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","libuv","r"],"created_at":"2024-08-02T22:00:51.208Z","updated_at":"2026-03-06T00:12:30.538Z","avatar_url":"https://github.com/r-lib.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\nif (basename(getwd()) == \"docs\") {\n  knitr::opts_knit$set(root.dir = file.path(getwd(), \"..\"))\n}\nfs:::pkgdown_tmp(c(\"/tmp/filedd463d6d7e0f\", \"/tmp/filedd464dbb3467\"))\n```\n\n# fs \u003ca href=\"https://fs.r-lib.org/\"\u003e\u003cimg src=\"man/figures/logo.png\" align=\"right\" height=\"138\" alt=\"fs website\" /\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html#maturing)\n[![R-CMD-check](https://github.com/r-lib/fs/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/fs/actions/workflows/R-CMD-check.yaml)\n[![Codecov test coverage](https://codecov.io/gh/r-lib/fs/graph/badge.svg)](https://app.codecov.io/gh/r-lib/fs)\n\u003c!-- badges: end --\u003e\n\n**fs** provides a cross-platform, uniform interface to file system operations.\nIt shares the same back-end component as [nodejs](https://nodejs.org), the\n[libuv](https://docs.libuv.org/en/v1.x/fs.html) C library, which brings the\nbenefit of extensive real-world use and rigorous cross-platform testing. The\nname, and some of the interface, is partially inspired by Rust's [fs\nmodule](https://doc.rust-lang.org/std/fs/index.html).\n\n## Installation\n\nYou can install the released version of **fs** from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"fs\")\n```\n\nAnd the development version from [GitHub](https://github.com/) with:\n```r\npak::pak(\"r-lib/fs\")\n```\n\n## Comparison vs base equivalents\n\n**fs** functions smooth over some of the idiosyncrasies of file handling with\nbase R functions:\n\n* Vectorization. All **fs** functions are vectorized, accepting multiple paths\n  as input. Base functions are inconsistently vectorized.\n\n* Predictable return values that always convey a path. All **fs** functions\n  return a character vector of paths, a named integer or a logical vector, where\n  the names give the paths. Base return values are more varied: they are often\n  logical or contain error codes which require downstream processing.\n\n* Explicit failure. If **fs** operations fail, they throw an error. Base\n  functions tend to generate a warning and a system dependent error code. This\n  makes it easy to miss a failure.\n\n* UTF-8 all the things. **fs** functions always convert input paths to UTF-8 and\n  return results as UTF-8. This gives you path encoding consistency across OSes.\n  Base functions rely on the native system encoding.\n\n* Naming convention. **fs** functions use a consistent naming convention.\n  Because base R's functions were gradually added over time there are a number\n  of different conventions used (e.g. `path.expand()` vs `normalizePath()`;\n  `Sys.chmod()` vs `file.access()`).\n\n### Tidy paths\n\n**fs** functions always return 'tidy' paths. Tidy paths\n\n  - Always use `/` to delimit directories\n  - never have multiple `/` or trailing `/`\n\nTidy paths are also coloured (if your terminal supports it) based on the\nfile permissions and file type. This colouring can be customized or extended by\nsetting the `LS_COLORS` environment variable, in the same output format as [GNU\ndircolors](https://www.bigsoft.co.uk/blog/index.php/2008/04/11/configuring-ls_colors).\n\n## Usage\n\n**fs** functions are divided into four main categories:\n\n  * `path_` for manipulating and constructing paths\n  * `file_` for files\n  * `dir_` for directories\n  * `link_` for links\n\nDirectories and links are special types of files, so `file_` functions\nwill generally also work when applied to a directory or link.\n\n```{r}\nlibrary(fs)\n\n# Construct a path to a file with `path()`\npath(\"foo\", \"bar\", letters[1:3], ext = \"txt\")\n\n# list files in the current directory\ndir_ls()\n\n# create a new directory\ntmp \u003c- dir_create(file_temp())\ntmp\n\n# create new files in that directory\nfile_create(path(tmp, \"my-file.txt\"))\ndir_ls(tmp)\n\n# remove files from the directory\nfile_delete(path(tmp, \"my-file.txt\"))\ndir_ls(tmp)\n\n# remove the directory\ndir_delete(tmp)\n```\n\n**fs** is designed to work well with the pipe, though because it is a\nminimal-dependency infrastructure package it doesn't provide the pipe itself.\nYou will need to attach [magrittr](https://magrittr.tidyverse.org) or similar.\n\n```{r}\nlibrary(magrittr)\n\npaths \u003c- file_temp() |\u003e\n  dir_create() |\u003e\n  path(letters[1:5]) |\u003e\n  file_create()\npaths\n\npaths |\u003e file_delete()\n```\n\n**fs** functions also work well in conjunction with other\n[tidyverse](https://tidyverse.org/) packages, like\n[dplyr](https://dplyr.tidyverse.org) and [purrr](https://purrr.tidyverse.org).\n\nSome examples...\n\n```{r}\nsuppressMessages(\n  library(tidyverse))\n```\n\nFilter files by type, permission and size\n\n```{r}\ndir_info(\"src\", recurse = FALSE) |\u003e\n  filter(type == \"file\", permissions == \"u+r\", size \u003e \"10KB\") |\u003e\n  arrange(desc(size)) |\u003e\n  select(path, permissions, size, modification_time)\n```\n\nTabulate and display folder size.\n\n```{r}\ndir_info(\"src\", recurse = TRUE) |\u003e\n  group_by(directory = path_dir(path)) |\u003e\n  tally(wt = size, sort = TRUE)\n```\n\nRead a collection of files into one data frame.\n\n`dir_ls()` returns a named vector, so it can be used directly with\n`purrr::map_df(.id)`.\n\n```{r}\n# Create separate files for each species\niris |\u003e\n  (\\(x) split(x, x$Species))() |\u003e\n  map(select, -Species) |\u003e\n  iwalk(\\(.x, .y) write_tsv(.x, paste0(.y, \".tsv\")))\n\n# Show the files\niris_files \u003c- dir_ls(glob = \"*.tsv\")\niris_files\n\n# Read the data into a single table, including the filenames\niris_files |\u003e\n  map_df(read_tsv, .id = \"file\", col_types = cols(), n_max = 2)\n\nfile_delete(iris_files)\n```\n\n## Feedback wanted!\n\nWe hope **fs** is a useful tool for both analysis scripts and packages.\nPlease open [GitHub issues](https://github.com/r-lib/fs) for any feature requests or bugs.\n\nIn particular, we have found non-ASCII filenames in non-English locales on\nWindows to be especially tricky to reproduce and handle correctly. Feedback\nfrom users who use commonly have this situation is greatly appreciated.\n\n## Code of Conduct\n\nPlease note that the fs project is released with a\n[Contributor Code of Conduct](https://fs.r-lib.org/dev/CODE_OF_CONDUCT.html).\nBy contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-lib%2Ffs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr-lib%2Ffs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-lib%2Ffs/lists"}