Skip to content

Abstract `VFS` `Root`

Kamil Trzciński requested to merge abstract-vfs-dir into master

#446 (closed)

This:

  • extends VFS interface with Root to represent a chrooted directory in which we work
// VFS abstracts the things Pages needs to serve a static site from disk.
type VFS interface {
	Dir(ctx context.Context, path string) (Dir, error)
}

// Root abstracts the things Pages needs to serve a static site from a given path.
type Root interface {
	Lstat(ctx context.Context, name string) (os.FileInfo, error)
	Readlink(ctx context.Context, name string) (string, error)
	Open(ctx context.Context, name string) (File, error)
}

Tests are broken

Edited by Kamil Trzciński

Merge request reports