Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(readDir string) proto.FileHandler
NewHandler is a handler that can be registered with a micro Server
func RegisterHandler ¶
RegisterHandler is a convenience method for registering a handler
Types ¶
type File ¶
type File interface {
	Open(filename string, truncate bool) (int64, error)
	Stat(filename string) (*proto.StatResponse, error)
	GetBlock(sessionId, blockId int64) ([]byte, error)
	ReadAt(sessionId, offset, size int64) ([]byte, error)
	Read(sessionId int64, buf []byte) (int, error)
	Write(sessionId, offset int64, data []byte) error
	Close(sessionId int64) error
	Download(filename, saveFile string) error
	Upload(filename, localFile string) error
	DownloadAt(filename, saveFile string, blockId int) error
}
    Client is the client interface to access files
 Click to show internal directories. 
   Click to hide internal directories.