filerepo

package
v0.0.0-...-d842b63 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Directory

type Directory struct {
	Repo *Repository
	Res  *LocalRes
	Obj  *lockman.ObjEntry
}

func (*Directory) Create

func (d *Directory) Create(name string, dir bool) (*Directory, *File, error)

func (*Directory) Delete

func (d *Directory) Delete(name string, dir bool) error

func (*Directory) Dispose

func (d *Directory) Dispose()

func (*Directory) IsChildEmpty

func (d *Directory) IsChildEmpty(name string) error

func (*Directory) IsEmpty

func (d *Directory) IsEmpty() bool

func (*Directory) Listup

func (d *Directory) Listup() []Entry

func (*Directory) Lookup

func (d *Directory) Lookup(name string) (*Directory, *File, error)

func (*Directory) Rename

func (d *Directory) Rename(name, newName string) error

type Entry

type Entry struct {
	IsDir bool
	Name  string
}

type File

type File struct {
	Res *LocalRes
	Obj *lockman.ObjEntry
}

func (*File) Dispose

func (f *File) Dispose()

func (*File) ReadAt

func (f *File) ReadAt(p []byte, off int64) (n int, err error)

func (*File) Size

func (f *File) Size() int64

func (*File) Truncate

func (f *File) Truncate(size int64) error

func (*File) WriteAt

func (f *File) WriteAt(p []byte, off int64) (n int, err error)

type LocalRes

type LocalRes struct {
	Res  *resource.Resource
	File *joinf.JoinFile
	Dir  *joinf.Directory
}

type Repository

type Repository struct {
	lockman.Lockman
	Repo uidf.IRepo
}

func (*Repository) GetDir

func (r *Repository) GetDir(id string) *Directory

func (*Repository) Init

func (r *Repository) Init()

Jump to

Keyboard shortcuts

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