propfind

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlePropfind

func HandlePropfind(fs FS, w http.ResponseWriter, r *http.Request, prefix string) (status int, err error)

func StripPrefix

func StripPrefix(p, prefix string) (string, int, error)

StripPrefix strips the prefix from path p.

Types

type FS

type FS interface {
	OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (FSFile, error)
	Stat(ctx context.Context, name string) (os.FileInfo, error)
}

FS is the minimal filesystem interface needed for PROPFIND operations.

type FSFile

type FSFile interface {
	io.Closer
	Readdir(count int) ([]os.FileInfo, error)
}

FSFile is the minimal file interface needed for PROPFIND directory traversal.

type Property

type Property struct {
	XMLName  xml.Name
	Lang     string `xml:"xml:lang,attr,omitempty"`
	InnerXML []byte `xml:",innerxml"`
}

Property represents a single DAV property.

type Propstat

type Propstat struct {
	Props               []Property
	Status              int
	XMLError            string
	ResponseDescription string
}

Propstat groups a set of properties with a common HTTP status.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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