{"id":43223276,"url":"https://github.com/gnames/gnsys","last_synced_at":"2026-02-01T09:15:51.109Z","repository":{"id":57564237,"uuid":"334998277","full_name":"gnames/gnsys","owner":"gnames","description":"Helper package for file system operations","archived":false,"fork":false,"pushed_at":"2026-01-15T10:32:59.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-15T15:49:43.320Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/gnames.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-02-01T15:40:53.000Z","updated_at":"2026-01-15T10:33:02.000Z","dependencies_parsed_at":"2024-02-04T02:35:30.547Z","dependency_job_id":"f9f0c3e3-a853-41ae-b4b7-2fdb9263fe2a","html_url":"https://github.com/gnames/gnsys","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/gnames/gnsys","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnames%2Fgnsys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnames%2Fgnsys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnames%2Fgnsys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnames%2Fgnsys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnames","download_url":"https://codeload.github.com/gnames/gnsys/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnames%2Fgnsys/sbom","scorecard":{"id":431026,"data":{"date":"2025-08-11","repo":{"name":"github.com/gnames/gnsys","commit":"f6892bc1808b83a727393a9cfade230faf979ace"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":-1,"reason":"no workflows found","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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"Maintained","score":0,"reason":"1 commit(s) and 0 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":"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"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"}}]},"last_synced_at":"2025-08-19T03:21:16.900Z","repository_id":57564237,"created_at":"2025-08-19T03:21:16.900Z","updated_at":"2025-08-19T03:21:16.900Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28974535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T08:16:14.655Z","status":"ssl_error","status_checked_at":"2026-02-01T08:06:51.373Z","response_time":56,"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":[],"created_at":"2026-02-01T09:15:48.851Z","updated_at":"2026-02-01T09:15:51.102Z","avatar_url":"https://github.com/gnames.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gnsys\n\nA Go helper package providing utilities for filesystem operations, archive extraction, and file downloads.\n\n## Installation\n\n```bash\ngo get github.com/gnames/gnsys\n```\n\n## Features\n\n- **File \u0026 Directory Operations**: Check existence, create directories, copy files, detect file types\n- **Archive Extraction**: Extract zip, tar, gzip, xz, bzip2 archives and combinations\n- **File Downloads**: HTTP downloads with optional progress bars\n- **Path Utilities**: Tilde expansion, path splitting\n- **Text File Detection**: Heuristic-based text file identification\n\n## Usage\n\n### File and Directory Operations\n\n```go\nimport \"github.com/gnames/gnsys\"\n\n// Check if file exists\nexists, err := gnsys.FileExists(\"path/to/file.txt\")\n\n// Check if directory exists and if it's empty\nexists, empty, err := gnsys.DirExists(\"path/to/dir\")\n\n// Create directory (with parent directories)\nerr := gnsys.MakeDir(\"path/to/new/dir\")\n\n// Clean directory (remove all contents or create if absent)\nerr := gnsys.CleanDir(\"path/to/dir\")\n\n// Get directory state\nstate := gnsys.GetDirState(\"path/to/dir\")\n// Returns: DirAbsent, DirEmpty, DirNotEmpty, NotDir, or Unknown\n\n// Copy file\nbytesCopied, err := gnsys.CopyFile(\"source.txt\", \"dest.txt\")\n\n// Detect if file is text\nisText, err := gnsys.IsTextFile(\"path/to/file\")\n```\n\n### Path Utilities\n\n```go\n// Expand tilde in path\nfullPath, err := gnsys.ConvertTilda(\"~/documents/file.txt\")\n\n// Split path into directory, base name, and extension\ndir, base, ext := gnsys.SplitPath(\"/path/to/file.tar.gz\")\n// dir: \"/path/to\", base: \"file.tar\", ext: \".gz\"\n```\n\n### Archive Extraction\n\n```go\n// Extract various archive formats\nerr := gnsys.ExtractZip(\"archive.zip\", \"dest/dir\")\nerr := gnsys.ExtractTar(\"archive.tar\", \"dest/dir\")\nerr := gnsys.ExtractGz(\"file.gz\", \"dest/dir\")\nerr := gnsys.ExtractXz(\"file.xz\", \"dest/dir\")\nerr := gnsys.ExtractTarGz(\"archive.tar.gz\", \"dest/dir\")\nerr := gnsys.ExtractTarXz(\"archive.tar.xz\", \"dest/dir\")\nerr := gnsys.ExtractTarBz2(\"archive.tar.bz2\", \"dest/dir\")\n```\n\n### File Type Detection\n\n```go\n// Get file type based on extension\nft := gnsys.GetFileType(\"archive.tar.gz\")\n// Returns: TarGzFT\n\nfmt.Println(ft.String()) // Prints: \"tar-gzip\"\n\n// Available file types:\n// ZipFT, GzFT, XzFT, TarFT, TarGzFT, TarXzFt, TarBzFT, SqlFT, SqliteFT\n```\n\n### File Downloads\n\n```go\n// Download file without progress bar\nfilePath, err := gnsys.Download(\"https://example.com/file.zip\", \"/dest/dir\", false)\n\n// Download file with progress bar\nfilePath, err := gnsys.Download(\"https://example.com/file.zip\", \"/dest/dir\", true)\n\n// Check if server is reachable\nisReachable := gnsys.Ping(\"example.com:80\", 3) // 3 second timeout\n```\n\n## Error Types\n\nThe package provides custom error types for better error handling:\n\n- `ErrFileMissing`: File not found at specified path\n- `ErrNotFile`: Path is not a regular file\n- `ErrNotDir`: Path is not a directory\n- `ErrExtract`: Archive extraction failed\n- `ErrDownload`: File download failed\n\n## Testing\n\nRun tests using:\n\n```bash\njust test\n```\n\nOr directly with Go:\n\n```bash\ngo test -v\n```\n\n## License\n\nLicensed under MIT (see LICENSE file)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnames%2Fgnsys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnames%2Fgnsys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnames%2Fgnsys/lists"}