Robin Brämer
70f98daaf3
Add missing error check in RegexpFs Open
2020-04-18 19:14:24 +02:00
Michail Kargakis
a2fefa4cb9
Merge pull request #240 from cugu/patch-1
...
Fix zipfs.Readdir and zipfs.Readdirnames
2020-04-14 23:39:02 +02:00
Jonas Plum
5fd16ea9f1
Fix zipfs.Readdir and zipfs.Readdirnames
...
If count == 0 all files should be returned as of https://golang.org/pkg/os/#File.Readdir
2020-04-14 22:36:17 +02:00
Michail Kargakis
ceb6a5e372
Merge pull request #158 from kklin/sftp-openfile
...
sftpfs: Implement OpenFile method
2020-04-11 00:22:21 +02:00
Michail Kargakis
02a77d47d0
Merge pull request #192 from saromanov/fix-match
...
match: change strings.IndexAny to strings.ContainsAny
2020-04-11 00:18:31 +02:00
Michail Kargakis
2c061eb5bc
Merge pull request #238 from kargakis/gofmt
...
Run gofmt and go vet in CI
2020-04-11 00:11:29 +02:00
Michail Kargakis
90f4ffe95f
Gofmt the project
2020-04-10 23:59:22 +02:00
Michail Kargakis
d66a0674ca
Add gofmt and go vet checks in CI
2020-04-10 23:59:21 +02:00
Michail Kargakis
900cf72eec
Merge pull request #167 from jslching/master
...
Return closed error in mem.File.Write() after Close()
2020-04-10 23:44:32 +02:00
Michail Kargakis
55428b400d
Merge pull request #146 from hillu/zipfs
...
Add zipfs, an archive/zip-based read-only filesystem
2020-04-10 23:21:50 +02:00
Hilko Bengen
344ad9d197
Don't hide errors while reading from ZIP files
2020-03-30 15:45:29 +02:00
Hilko Bengen
9b520d0821
Use filepath.Separator in test code, to fix tests on Windows
2020-03-30 14:44:04 +02:00
Hilko Bengen
72cabd552e
Eliminate another root-path-related corner case
2020-03-30 14:44:04 +02:00
Hilko Bengen
d5bfeca89b
Work around root directory Open/Stat corner case leading to panic
...
See https://github.com/spf13/afero/pull/146#issuecomment-470840725
2020-03-30 14:44:04 +02:00
Hilko Bengen
4f00b06400
Add zipfs, an archive/zip-based read-only filesystem
2020-03-30 14:44:04 +02:00
Michail Kargakis
f1155579b0
Merge pull request #236 from kargakis/travis-update
...
Build and test CI improvements
2020-03-28 14:30:46 +01:00
Michail Kargakis
72d3215259
Build and test CI improvements
2020-03-28 14:01:49 +01:00
Michail Kargakis
6c364fcc86
Merge pull request #229 from ichekrygin/wild-temp-file
...
Add Support for WildCard in TempFile Name Prefix
2020-03-27 22:02:37 +01:00
Michail Kargakis
ff1b22491c
Merge pull request #157 from xor-gate/sftpfs-fix-test
...
sftpfs: Fix test with latest API of the sftp package
2020-03-27 21:49:32 +01:00
Michail Kargakis
491ff289da
Merge pull request #223 from whereswaldon/patch-1
...
Remove stale release notes from README
2020-03-27 21:46:00 +01:00
Michail Kargakis
cc3719f211
Merge pull request #182 from btc/btc/0002
...
add ReadAt/Seek test
2020-03-27 21:43:44 +01:00
Michail Kargakis
de012fc5f2
Merge pull request #187 from yasoob/patch-1
...
Fixed a small typo
2020-03-27 21:30:35 +01:00
Michail Kargakis
00285cd3a3
Merge pull request #155 from rwaweber/readme_grammar
...
fix grammar typos in readme
2020-03-27 21:29:24 +01:00
Michail Kargakis
ac701bd5ba
Merge pull request #210 from Helflym/aix
...
Add AIX support
2020-03-27 20:18:39 +01:00
Illya Chekrygin
e016ffbd1f
Add implementation for TempFile with wild card prefix
...
Signed-off-by: Illya Chekrygin <illya.chekrygin@gmail.com>
2020-01-06 22:31:16 -08:00
Christopher Waldon
338097a104
Remove stale release notes from README
...
New users coming to the project could incorrectly assume that the project is pre-1.0 release and that it hasn't had a release in years if they assumed that the release notes in the README were up-to-date. I say this because I assumed that on my first read.
2019-11-03 14:44:18 -05:00
Clément Chigot
4e0df35705
Add AIX support
2019-07-04 15:58:10 +02: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
Sergey
617d93fa6d
match: change strings.IndexAny to strings.ContainsAny
2019-01-10 23:22:24 +05:00
Bjørn Erik Pedersen
a5d6946387
Return nil in CopyOnWriteFs.MkdirAll when directory exists
...
Fixes #191
2018-12-17 09:55:40 +01:00
Bjørn Erik Pedersen
5e9f8ecaa4
Return os.ErrExist from CopyOnWriteFs.Mkdir/MkdirAll
...
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
2018-12-17 09:55:40 +01:00
M.Yasoob Ullah Khalid ☺
2236cc58df
Fixed a small typo
2018-12-04 00:59:11 -05:00
Brian Tiger Chow
e151fe9493
fix ReadAt
2018-11-20 13:34:41 -05:00
Brian Tiger Chow
709edc9d8f
add ReadAt/Seek test
2018-11-20 13:29:30 -05:00
Bjørn Erik Pedersen
d40851caa0
Add go.mod
2018-09-07 11:23:51 +02:00
Bjørn Erik Pedersen
787d034dfe
Return error in Readdir on regular mem file
...
Fixes #169
2018-05-31 11:51:01 +02:00
elv-jon
0408d604d0
Return closed error in mem.File.Write() after Close()
2018-05-17 15:45:50 -07:00
Bjørn Erik Pedersen
63644898a8
Return os.ErrNotExist in BasePathFs on abs URLs on Windows
...
So it can be used in a composite filesystem.
Fixes #162
2018-04-01 22:57:52 +02: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
Martin Bertschler
a880a37ed1
upgrade travis Go versions to current and previous (1.10 and 1.9), remove 1.8
2018-03-22 23:51:30 +01:00
Martin Bertschler
6e0c3784c4
Merge pull request #147 from arbelt/fix-basepathfile
...
fix File.Name() on BasePathFS (wrap File objects returned by BasePathFs)
2018-03-22 23:44:38 +01:00
Kevin Lin
887ec81f2f
sftpfs: Implement OpenFile method
...
Before, the OpenFile method was unimplemented, and just returned `nil,
nil`. Because the Afero.TempFile method calls the OpenFile method, this
behavior caused a nil pointer exception when TempFile was used with
sftpfs.
This commit adds a simple implementation for sftpfs.OpenFile, fixing the
exception thrown when using it with TempFile.
2018-03-18 19:09:08 -07:00
Jerry Jacobs
81cbd6395a
sftps: Fix test with latest API of the sftp package
2018-03-09 11:31:10 +01:00
Jamie Wilkinson
bbf41cb36d
Removes go 1.7 from the build matrix, adds 1.9
...
Travis builds are failing on go 1.7.5 because of github.com/pkg/sftp doesn't support that version anymore.
2018-02-12 03:27:14 +11:00
rwaweber
b06a9e879d
fix grammar in readme
2018-02-08 23:49:45 -05:00
Bjørn Erik Pedersen
bb8f1927f2
Return error instead of panic in WriteReader
...
See https://github.com/gohugoio/hugo/issues/4240
2018-01-15 20:27:20 +01:00
Bjørn Erik Pedersen
57afd63c68
Revert "readme: Link to release notes in Releases"
...
Someone else will have to do this work.
This reverts commit a43378e6c4
.
2017-12-28 13:50:11 +01:00
Bjørn Erik Pedersen
a43378e6c4
readme: Link to release notes in Releases
...
Closes #151
2017-12-28 13:31:12 +01:00