flop alternatives and similar packages
Based on the "Files" category.
Alternatively, view flop alternatives based on common mentions on social networks and blogs.
-
bigfile
A file transfer system, support to manage files with http api, rpc call and ftp client. -
vfs
A pluggable, extensible, and opinionated set of filesystem functionality for Go across a number of filesystem types such as os, S3, and GCS. -
go-exiftool
Go bindings for ExifTool, the well-known library used to extract as much metadata as possible (EXIF, IPTC, ...) from files (pictures, PDF, office, ...). -
skywalker
A package to allow one to concurrently go through a filesystem with ease. -
concurrent-writer
Highly concurrent drop-in replacement for bufio.Writer -
gut/yos
Simple and reliable package for file operations like copy/move/diff/list on files, directories and symbolic links. -
fileconversion
A Go library to convert various file formats to plaintext and provide related functions -
shred
This is a libary to mimic the functionallity of the linux shred command. -
go-staticfiles
Collects assets (css, js, images...) from a different locations, tags file names with a hash for easy versioning and aggressive caching.
Scout APM - Leading-edge performance monitoring starting at $39/month
Do you think we are missing an alternative of flop or a related project?
Popular Comparisons
README
flop
flop is a Golang file operations library concentrating on safety and feature parity with GNU cp. Most administrators and engineers interact with GNU utilities every day, so it makes sense to utilize that knowledge and expectations for a library that does the same operation in code. flop strategically diverges from cp where it is advantageous for the programmer to explicitly define the behavior, like cp assuming that copying from a file path to a directory path means the file should be created inside the directory. This behavior must be explicitly defined in flop by passing the option AppendNameToPath, otherwise an error will be returned.
go get -u github.com/homedepot/flop
Usage
Basic file copy.
err := flop.SimpleCopy("src_path", "dst_path")
handle(err)
Advanced file copy with options.
options := flop.Options{
Recursive: true,
MkdirAll: true,
}
err := flop.Copy("src_path", "dst_path", options)
handle(err)
Logging
flop 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 can help expose the behavior, or aid in debugging if you are generous enough to contribute.
// the logger just takes a string so format your favorite logger to accept one
import (
"github.com/homedepot/flop"
"github.com/rs/zerolog"
zlog "github.com/rs/zerolog/log"
llog "github.com/sirupsen/logrus"
)
func logDebug(msg string) {
llog.WithFields(llog.Fields{
"application": "stuffcopy",
}).Info(msg)
}
func main() {
zlog.Logger = zlog.Output(zerolog.ConsoleWriter{Out: os.Stderr})
err := flop.Copy(src.Name(), dst.Name(), flop.Options{
InfoLogFunc: zlog.Info().Msg, // Msg already accepts a string so we can just pass it directly
DebugLogFunc: logDebug, // logrus Debug takes ...interface{} so we need to wrap it
})
handle(err)
}
*Note that all licence references and agreements mentioned in the flop README section above
are relevant to that project's source code only.