Documentation
¶
Overview ¶
Package options provides a set of interfaces and functions to define and apply options for file systems.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyOptions ¶
func ApplyOptions[T any](fs *T, opts ...NewFileSystemOption[T])
ApplyOptions is a helper to apply multiple options in a single call.
Types ¶
type DeleteOption ¶
type DeleteOption interface {
DeleteOptionName() string
}
DeleteOption interface contains function that should be implemented by any custom option to qualify as a delete option. Example: ```
type TakeBackupDeleteOption{}
func (o TakeBackupDeleteOption) DeleteOptionName() string {
return "take backup"
}
func (o TakeBackupDeleteOption) BackupLocation() string {
return o.backupLocation
}
```
type NewFileOption ¶
type NewFileOption interface {
NewFileOptionName() string
}
NewFileOption interface contains function that should be implemented by any custom option to qualify as a new file option.
type NewFileSystemOption ¶
NewFileSystemOption interface contains function that should be implemented by any custom option to qualify as a new file system option.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package delete provides options for deleting files and directories in a virtual filesystem.
|
Package delete provides options for deleting files and directories in a virtual filesystem. |
|
Package newfile provides options for creating new files in a virtual filesystem.
|
Package newfile provides options for creating new files in a virtual filesystem. |
Click to show internal directories.
Click to hide internal directories.