fs

package
v0.0.0-...-1310e1d Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package fs exposes the required interface needed by the FTP Server in order to use the fs as backend file system

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File interface {
	Name() string
	Path() string
	FullPath() string
	Size() int64
	IsDirectory() bool
	ModTime() time.Time

	Read(startPosition int64) (io.ReadCloser, error)
	Write() (io.WriteCloser, error)

	Delete() error

	Clone() File

	Mode() string
}

File is the minimum interface needed to be supported as file (or directory)

type FileProvider

type FileProvider interface {
	Identity() identity.Identity
	SetIdentity(identity identity.Identity)
	Clone() FileProvider
	New(name string, isDirectory bool) (File, error)
	Get(filename string) (File, error)
	List() ([]File, error)
	CurrentDirectory() string
	ChangeDirectory(path string) error
	CreateDirectory(name string) error
	RemoveDirectory(name string) error
}

FileProvider represents the file system handle. It should store the current directory to allow fs traversing with relative paths

Directories

Path Synopsis
Package azureFS implements fs.FileProvider and handles Azure blob storage
Package azureFS implements fs.FileProvider and handles Azure blob storage
azureBlob
Package azureBlob implements the fs interfaces for the local file system
Package azureBlob implements the fs interfaces for the local file system
azureContainer
Package azureContainer implements fs.File but is specific for Azure containers
Package azureContainer implements fs.File but is specific for Azure containers
Package localFS implements the fs interfaces for the local file system
Package localFS implements the fs interfaces for the local file system
physicalFile
Package physicalFile implements the fs interfaces for the local file system
Package physicalFile implements the fs interfaces for the local file system

Jump to

Keyboard shortcuts

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