Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File interface { Create() error Exists() bool Path() string IsEqualTo(file File) bool AsBytes() ([]byte, error) Write(data []byte) error }
File interface
func NewFileByAbsolutePath ¶
NewFileByAbsolutePath creates a new file by path
type FileByPath ¶
type FileByPath struct {
// contains filtered or unexported fields
}
FileByPath implementing File interface
func (*FileByPath) Create ¶
func (f *FileByPath) Create() error
Create empty file if it does not exist
func (*FileByPath) Exists ¶
func (f *FileByPath) Exists() bool
Exists whether or not the file exists
func (*FileByPath) IsEqualTo ¶
func (f *FileByPath) IsEqualTo(file File) bool
IsEqualTo compares the file
func (*FileByPath) Write ¶
func (f *FileByPath) Write(data []byte) error
Click to show internal directories.
Click to hide internal directories.