README.md (2064B)
1 [](https://godoc.org/github.com/dsoprea/go-utility/filesystem) 2 [](https://travis-ci.org/dsoprea/go-utility) 3 [](https://coveralls.io/github/dsoprea/go-utility?branch=master) 4 [](https://goreportcard.com/report/github.com/dsoprea/go-utility) 5 6 # bounceback 7 8 An `io.ReadSeeker` and `io.WriteSeeker` that returns to the right place before 9 reading or writing. Useful when the same file resource is being reused for reads 10 or writes throughout that file. 11 12 # list_files 13 14 A recursive path walker that supports filters. 15 16 # seekable_buffer 17 18 A memory structure that satisfies `io.ReadWriteSeeker`. 19 20 # copy_bytes_between_positions 21 22 Given an `io.ReadWriteSeeker`, copy N bytes from one position to an earlier 23 position. 24 25 # read_counter, write_counter 26 27 Wrap `io.Reader` and `io.Writer` structs in order to report how many bytes were 28 transferred. 29 30 # readseekwritecloser 31 32 Provides the ReadWriteSeekCloser interface that combines a RWS and a Closer. 33 Also provides a no-op wrapper to augment a plain RWS with a closer. 34 35 # boundedreadwriteseek 36 37 Wraps a ReadWriteSeeker such that no seeks can be at an offset less than a 38 specific-offset. 39 40 # calculateseek 41 42 Provides a reusable function with which to calculate seek offsets. 43 44 # progress_wrapper 45 46 Provides `io.Reader` and `io.Writer` wrappers that also trigger callbacks after 47 each call. The reader wrapper also invokes the callback upon EOF. 48 49 # does_exist 50 51 Check whether a file/directory exists using a file-path. 52 53 # graceful_copy 54 55 Do a copy but correctly handle short-writes and reads that might return a non- 56 zero read count *and* EOF. 57 58 # readseeker_to_readerat 59 60 A wrapper that allows an `io.ReadSeeker` to be used as a `io.ReaderAt`. 61 62 # simplefileinfo 63 64 An implementation of `os.FileInfo` to support testing.