{"modulePath":"github.com/AlaudaDevops/pkg","version":"v0.14.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package io\n\nPackage io some io operation functions\n\n## Functions\n\n```go\nfunc Copy(src, dst string, opts ...CopyOption) error\n```\nCopy support copy file to file or dir to dir\n\n```go\nfunc GetIOStreams(ctx context.Context) (ioStreams *clioptions.IOStreams)\n```\nGetIOStreams returns IOStreams stored in the context if any if not found will return nil \\*IOStreams\n\n```go\nfunc IsDir(dir string) bool\n```\nIsDir check if the given path is a dir\n\n```go\nfunc IsExist(path string) bool\n```\nIsExist check if the given path is existed\n\n```go\nfunc IsFile(file string) bool\n```\nIsFile check if the given path is a file\n\n```go\nfunc MustGetIOStreams(ctx context.Context) (ioStreams *clioptions.IOStreams)\n```\nMustGetIOStreams gets the IOStream from context or initiates a default using os.Stdin, os.Stout, os.Sterr\n\n```go\nfunc WithIOStreams(ctx context.Context, ioStreams *clioptions.IOStreams) context.Context\n```\nWithIOStreams adds IOStreams into the context\n\n```go\nfunc WriteFile(dstFile string, content []byte, perm os.FileMode) error\n```\nWriteFile write the content to the desired file\n\n## Types\n\n```go\ntype Config struct {\n\tFileFilter []func(srcFile, dstFile string) bool\n}\n```\nConfig configuration for copy operation\n\n```go\ntype CopyOption func(config *Config)\n```\nCopyOption function for setting CopyConfig\n\n```go\nfunc FileFilterOption(f func(srcFile, dstFile string) bool) CopyOption\n```\nFileFilterOption construct file filter \\`CopyOption\\`\n\n","path":"github.com/AlaudaDevops/pkg/command/io","name":"io","synopsis":"Package io some io operation functions","isRedistributable":true}
