webdavfs: github.com/shurcooL/webdavfs/vfsutil Index | Files

package vfsutil

import "github.com/shurcooL/webdavfs/vfsutil"

Package vfsutil implements some I/O utility functions for webdav.FileSystem.

Index

Package Files

vfsutil.go

func Create Uses

func Create(fs webdav.FileSystem, name string) (webdav.File, error)

Create creates the named file with mode 0644 (before umask), truncating it if it already exists. If successful, methods on the returned File can be used for I/O; the associated file descriptor has mode O_RDWR. If there is an error, it will be of type *PathError.

func MkdirAll Uses

func MkdirAll(fs webdav.FileSystem, path string, perm os.FileMode) error

MkdirAll creates a directory named path, along with any necessary parents, and returns nil, or else returns an error. The permission bits perm are used for all directories that MkdirAll creates. If path is already a directory, MkdirAll does nothing and returns nil.

func Open Uses

func Open(fs webdav.FileSystem, name string) (http.File, error)

Open opens the named file for reading. If successful, methods on the returned file can be used for reading; the associated file descriptor has mode O_RDONLY. If there is an error, it will be of type *PathError.

func ReadDir Uses

func ReadDir(fs webdav.FileSystem, name string) ([]os.FileInfo, error)

ReadDir reads the contents of the directory associated with file and returns a slice of FileInfo values in directory order.

func WriteFile Uses

func WriteFile(fs webdav.FileSystem, name string, data []byte, perm os.FileMode) error

WriteFile writes data to a file named by name. If the file does not exist, WriteFile creates it with permissions perm; otherwise WriteFile truncates it before writing.

Package vfsutil imports 6 packages (graph) and is imported by 6 packages. Updated 2016-11-09. Refresh now. Tools for package owners.