Documentation ¶
Index ¶
- type File
- func (f *File) AttachVersion(v dir.Version) error
- func (f *File) CurrentVersion() dir.Version
- func (f *File) Delete() error
- func (f *File) DetachVersion(v dir.Version) error
- func (f *File) Directory() dir.Directory
- func (f *File) FindVersions(after time.Time, before time.Time, creator dir.User, recurseLevel int) ([]dir.Version, error)
- func (f *File) Name() string
- func (f *File) Owner() dir.User
- func (f *File) Rename(name string) error
- func (f *File) SetCurrentVersion(currentVersion dir.Version) error
- func (f *File) SetDirectory(d dir.Directory) error
- func (f *File) SetOwner(owner dir.User) error
- func (f *File) String() string
- func (f *File) UUID() uuid.UUID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
File is an implementation of dir.File
func CreateFile ¶
CreateFile creates a File in the provided Directory
func (*File) AttachVersion ¶
AttachVersion attaches a dir.Version to this file This checks to ensure the provided dir.Version isn't a duplicate before it attaches it.
func (*File) CurrentVersion ¶
CurrentVersion returns the File's current Version (which might not be the newest one)
func (*File) DetachVersion ¶
DetachVersion removes a dir.Version from this File This is intended to be called from the target File's .Delete() method itself. This does not test that the Version is ready to be deleted, whatever that means.
func (*File) FindVersions ¶
func (f *File) FindVersions(after time.Time, before time.Time, creator dir.User, recurseLevel int) ([]dir.Version, error)
FindVersions searches for one or more Version entries The `after`, `before`, and `creator` arguments are all optional and will be used in an `AND` search, if provided.
func (*File) SetCurrentVersion ¶
SetCurrentVersion sets the File's current Version (doesn't have to be the newest Version)
func (*File) SetDirectory ¶
SetDirectory sets the File's Directory