Documentation ¶
Index ¶
- func Combine(parent, relative string) string
- func ExistInFS(fs interface{}) types.GomegaMatcher
- func IsLinkError(err error, reason string)
- func Repo(relative string) string
- type AsDirectory
- type AsFile
- type FileAdapter
- type FileInfoAdapter
- type MemFS
- func (f *MemFS) Calc() nef.PathCalc
- func (f *MemFS) Change(_, _ string) error
- func (f *MemFS) Copy(_, _ string) error
- func (f *MemFS) CopyFS(_ string, _ fs.FS) error
- func (f *MemFS) Create(name string) (fs.File, error)
- func (f *MemFS) DirectoryExists(name string) bool
- func (f *MemFS) Ensure(_ nef.PathAs) (string, error)
- func (f *MemFS) FileExists(name string) bool
- func (f *MemFS) IsRelative() bool
- func (f *MemFS) MakeDir(name string, perm os.FileMode) error
- func (f *MemFS) MakeDirAll(name string, perm os.FileMode) error
- func (f *MemFS) Move(_, _ string) error
- func (f *MemFS) Remove(name string) error
- func (f *MemFS) RemoveAll(path string) error
- func (f *MemFS) Rename(from, to string) error
- func (f *MemFS) WriteFile(name string, data []byte, perm os.FileMode) error
- type PathExistsMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Combine ¶
Combine creates a path from the parent combined with the relative path. The relative path is a file system path so should only contain forward slashes, not the standard file path separator as denoted by filepath.Separator, typically used when interacting with the local file system. Do not use trailing "/".
func ExistInFS ¶
func ExistInFS(fs interface{}) types.GomegaMatcher
func IsLinkError ¶
Types ¶
type AsDirectory ¶
type AsDirectory string
type FileAdapter ¶
type FileAdapter struct {
// contains filtered or unexported fields
}
func (*FileAdapter) Close ¶
func (f *FileAdapter) Close() error
type FileInfoAdapter ¶
type FileInfoAdapter struct {
// contains filtered or unexported fields
}
func (*FileInfoAdapter) IsDir ¶
func (fi *FileInfoAdapter) IsDir() bool
func (*FileInfoAdapter) ModTime ¶
func (fi *FileInfoAdapter) ModTime() time.Time
func (*FileInfoAdapter) Mode ¶
func (fi *FileInfoAdapter) Mode() os.FileMode
func (*FileInfoAdapter) Name ¶
func (fi *FileInfoAdapter) Name() string
func (*FileInfoAdapter) Size ¶
func (fi *FileInfoAdapter) Size() int64
func (*FileInfoAdapter) Sys ¶
func (fi *FileInfoAdapter) Sys() interface{}
type MemFS ¶
MemFS is a memory fs based on fstest.MapFS intended to be used in unit tests. Clients can embed and override the methods defined here without having to provide a full implementation from scratch.
func (*MemFS) DirectoryExists ¶
func (*MemFS) FileExists ¶
func (*MemFS) IsRelative ¶ added in v0.1.9
type PathExistsMatcher ¶
type PathExistsMatcher struct {
// contains filtered or unexported fields
}
func (*PathExistsMatcher) FailureMessage ¶
func (m *PathExistsMatcher) FailureMessage(actual interface{}) string
func (*PathExistsMatcher) Match ¶
func (m *PathExistsMatcher) Match(actual interface{}) (bool, error)
func (*PathExistsMatcher) NegatedFailureMessage ¶
func (m *PathExistsMatcher) NegatedFailureMessage(actual interface{}) string
Click to show internal directories.
Click to hide internal directories.