{"id":13412794,"url":"https://github.com/homedepot/flop","last_synced_at":"2026-01-17T01:33:34.514Z","repository":{"id":55955188,"uuid":"173308443","full_name":"homedepot/flop","owner":"homedepot","description":"Go file operations library chasing GNU APIs.","archived":false,"fork":false,"pushed_at":"2021-12-07T15:59:35.000Z","size":20920,"stargazers_count":35,"open_issues_count":0,"forks_count":12,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-08-13T21:45:26.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/homedepot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-01T13:41:39.000Z","updated_at":"2025-05-25T11:34:44.000Z","dependencies_parsed_at":"2022-08-15T10:11:06.590Z","dependency_job_id":null,"html_url":"https://github.com/homedepot/flop","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/homedepot/flop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homedepot%2Fflop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homedepot%2Fflop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homedepot%2Fflop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homedepot%2Fflop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/homedepot","download_url":"https://codeload.github.com/homedepot/flop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homedepot%2Fflop/sbom","scorecard":{"id":468207,"data":{"date":"2025-08-11","repo":{"name":"github.com/homedepot/flop","commit":"bc70dee25c42a0e0ea694f0731dbdd1519cfd296"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"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":"Code-Review","score":1,"reason":"Found 3/29 approved changesets -- score normalized to 1","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":"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":"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":"Maintained","score":0,"reason":"0 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":"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":"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":"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":"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":"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":"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 '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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 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"}},{"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-19T13:03:57.753Z","repository_id":55955188,"created_at":"2025-08-19T13:03:57.753Z","updated_at":"2025-08-19T13:03:57.753Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28491601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"ssl_error","status_checked_at":"2026-01-17T00:43:11.982Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":"2024-07-30T20:01:29.294Z","updated_at":"2026-01-17T01:33:34.496Z","avatar_url":"https://github.com/homedepot.png","language":"Go","funding_links":[],"categories":["File Handling","Files","文件处理","Relational Databases","文件处理`处理文件和文件系统操作的库`"],"sub_categories":["Search and Analytic Databases","Advanced Console UIs","检索及分析资料库","SQL 查询语句构建库"],"readme":"# flop\n\n[![GoDoc](https://godoc.org/github.com/homedepot/flop?status.svg)](https://godoc.org/github.com/homedepot/flop)\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go)\n[![Go Report Card](https://goreportcard.com/badge/github.com/homedepot/flop)](https://goreportcard.com/report/github.com/homedepot/flop)\n\n\u003cimg src=\"https://github.com/homedepot/flop/raw/master/doc/logo.png\" width=\"200\" title=\"design based on original gopher by Renee French\"\u003e\n\n----\n\nflop aims to make copying files easier in Go, and is modeled after\n[GNU cp](https://www.gnu.org/software/coreutils/manual/html_node/cp-invocation.html).\nMost administrators and engineers interact with GNU utilities every day, so it makes sense to utilize\nthat knowledge and expectations for a library that does the same operation in code.\n\nflop strategically diverges from cp where it is advantageous for the programmer to explicitly define the\nbehavior, like cp assuming that copying from a file path to a directory path means the file should be\ncreated inside the directory. This behavior must be explicitly defined in flop by passing the option\nAppendNameToPath, otherwise an error will be returned.\n\n```BASH\ngo get -u github.com/homedepot/flop\n```\n\n## Usage\n\nBasic file copy.\n\n```go\nerr := flop.SimpleCopy(\"src_path\", \"dst_path\")\nhandle(err)\n```\n\nAdvanced file copy with [options](https://pkg.go.dev/github.com/homedepot/flop?tab=doc#Options).\n\n```go\noptions := flop.Options{\n    Recursive: true,\n    MkdirAll:  true,\n}\nerr := flop.Copy(\"src_path\", \"dst_path\", options)\nhandle(err)\n```\n\n## Logging\n\nflop won't throw logs at you for no reason, but if you want to follow along with what's going on giving it a logger\ncan help expose the behavior, or aid in debugging if you are generous enough to contribute.\n\n```go\n// the logger just takes a string so format your favorite logger to accept one\nimport (\n\t\"github.com/homedepot/flop\"\n\t\"github.com/rs/zerolog\"\n\tzlog \"github.com/rs/zerolog/log\"\n\tllog \"github.com/sirupsen/logrus\"\n)\n\nfunc logDebug(msg string) {\n\tllog.WithFields(llog.Fields{\n\t\t\"application\": \"stuffcopy\",\n\t}).Info(msg)\n}\n\nfunc main() {\n\tzlog.Logger = zlog.Output(zerolog.ConsoleWriter{Out: os.Stderr})\n\terr := flop.Copy(src.Name(), dst.Name(), flop.Options{\n\t\tInfoLogFunc: zlog.Info().Msg,  // Msg already accepts a string so we can just pass it directly\n\t\tDebugLogFunc: logDebug,        // logrus Debug takes ...interface{} so we need to wrap it\n\t})\n\thandle(err)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomedepot%2Fflop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhomedepot%2Fflop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomedepot%2Fflop/lists"}