content

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyExists = errors.New("user directory already exists")

ErrAlreadyExists is returned when a user directory can't be created because it already exists.

View Source
var ErrNotADirectory = errors.New("user directory is not a directory")

ErrNotADirectory is returned when something exists at a user directory location that is not a directory.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	Dir string
}

Manager provides functions to manage user-owned content.

func (*Manager) Create

func (m *Manager) Create(username string) error

Create creates a user directory, failing if it already exists.

func (*Manager) Delete

func (m *Manager) Delete(username string) error

Delete deletes a user directory.

func (*Manager) Exists

func (m *Manager) Exists(username string) (bool, error)

Exists returns true if a user directory exists for the given user.

func (*Manager) Rename

func (m *Manager) Rename(oldUsername string, newUsername string) error

Rename renames a user directory.

func (*Manager) UserDir

func (m *Manager) UserDir(username string) string

UserDir returns the path to a user directory.

func (*Manager) WebDAVDirFor

func (m *Manager) WebDAVDirFor(username string) webdav.Dir

WebDAVDirFor returns a webdav.Dir for a user directory.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL