update README to match the filters

This commit is contained in:
Hanno Hecker 2015-12-20 12:08:01 +01:00
parent d58bc1ed5a
commit b7796a53ce
1 changed files with 9 additions and 5 deletions

View File

@ -284,17 +284,21 @@ like
ROFs.AddFilter(afero.NewReadonlyFilter()) ROFs.AddFilter(afero.NewReadonlyFilter())
``` ```
The ROFs behaves like a normal afero.Fs now, with the only exception, that it The ROFs behaves like a normal afero.Fs now, with the only exception, that it
provides a readonly view of the underlying Fs. provides a readonly view of the underlying AppFs.
The FilterFs is run before the source Fs, any non nil error is returned The FilterFs is run before the source Fs and may intercept the call to the
to the caller without going to the source Fs. If every filter in the underlying source Fs and can modify the returned data. If it does not wish to
chain returns a nil error, the call is sent to the source Fs. do so, it just returns the data from the source.
The `AddFilter` adds a new filter before any existing filters. The `AddFilter` adds a new FilterFs before any existing filters.
## Available filters ## Available filters
* NewReadonlyFilter() - provide a read only view of the source Fs * NewReadonlyFilter() - provide a read only view of the source Fs
* NewRegexpFilter(*regexp.Regexp) - provide a filtered view on file names, any
file (not directory) NOT matching the passed regexp will be treated as
non-existing
# About the project # About the project