From e7cb826c1fa97286ab8c9c5a480ac1b33a4bc413 Mon Sep 17 00:00:00 2001 From: Hanno Hecker Date: Sun, 20 Dec 2015 12:08:01 +0100 Subject: [PATCH] update README to match the filters --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5c54057..3a624ea 100644 --- a/README.md +++ b/README.md @@ -284,17 +284,21 @@ like ROFs.AddFilter(afero.NewReadonlyFilter()) ``` 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 -to the caller without going to the source Fs. If every filter in the -chain returns a nil error, the call is sent to the source Fs. +The FilterFs is run before the source Fs and may intercept the call to the +underlying source Fs and can modify the returned data. If it does not wish to +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 * 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