Before this commit, `CopyOnWriteFs` would return `syscall.EEXIST` in `Mkdir` and `MkdirAll` when a directory already exists.
The main problem with this is that `os.IsExist` returns `false` for that error on Windows.
These methods now return `os.ErrExist`, which is in line with how the other file systems behave.
Fixes#189
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
CopyOnWriteFs Stat function only checks its base file system's file or
directory when its layer file system returns Stat error but if the layer
file system type is OsFs, it returns *os.PathError not syscall.ENOENT so
in this case, the base file system's file or directory is never checked.
This fixes the behavior above by expanding *os.PathError and repacking
the error code if the error type is *os.PathError.