Commit Graph

7 Commits

Author SHA1 Message Date
std0 066c8b09c5 Fix amount of files read in UnionFile.Readdir
To match behavior of os.File.Readdir, argument c in UnionFile.Readdir
should control amount of files read, not the upper bound of buffered
files.

Fixes #259
2020-08-23 02:36:25 +03:00
Cameron Moore 588a75ec4f Fix UnionFile.Readdir return when c <= 0
Update Readdir to match behavior of stdlib os package.

Fixes #197
2019-03-26 13:07:55 +01:00
Bjørn Erik Pedersen f4711e4db9 Fix missing bounds checking in UnionFile.Readdir
It will now return io.EOF at the end of the directory view.

Fixes #194
2019-01-30 09:29:40 +01:00
Bjørn Erik Pedersen b6dc11ece0
Make the merge func in UnionFile configureable 2018-04-01 22:57:52 +02:00
Bjørn Erik Pedersen 8902da1e4d
Add an optional Lstater interface
The interface has one method returning the `FileInfo` and a flag telling if `Lstat` was called or not.

```go
type Lstater interface {
    LstatIfPossible(name string) (os.FileInfo, bool, error)
}
```

`Lstat` is currently only supported by the `OsFs`, but since that `Fs` can be used in others, they will also support it by proxy.

But not always, so hence this optional interface.

The interface is in this commit implemented for:

* BasePathFs
* OsFs
* CopyOnWriteFs
* ReadOnlyFs

Fixes #75
2018-04-01 22:57:51 +02:00
Steve Francia 2ec8b79d61 Make OsFs.Open interoperable with others (with tests confirming) 2016-01-13 16:37:11 -05:00
Steve Francia 5c392cd048 Update filenames to reflect new names 2016-01-11 21:44:01 -05:00