Adding and optional Symlinker interface,

union interface supportint lstat, symlink and readlink
This commit is contained in:
Scott Owens 2019-12-10 16:16:41 +11:00
parent 529d861398
commit 819f7ad35d
1 changed files with 14 additions and 0 deletions

View File

@ -12,6 +12,20 @@
// limitations under the License. // limitations under the License.
package afero package afero
// Symlinker is an optional interface in Afero. It is only implemented by the
// filesystems saying so.
// It indicates support for 3 symlink related interfaces that implement the
// behaviors of the os methods:
// - Lstat
// - Symlink, and
// - Readlink
type Symlinker interface {
Lstater
Linker
LinkReader
}
// Linker is an optional interface in Afero. It is only implemented by the // Linker is an optional interface in Afero. It is only implemented by the
// filesystems saying so. // filesystems saying so.
// It will call Symlink if the filesystem itself is, or it delegates to, the os filesystem, // It will call Symlink if the filesystem itself is, or it delegates to, the os filesystem,