Documentation ¶
Index ¶
- Constants
- func Hash(d []byte) string
- func LocationOnDisk(hash string) string
- func RawData(hash string) ([]byte, error)
- func Reader(hash string) (io.Reader, error)
- func SizeOnDisk(hash string) (int64, error)
- func Sort(nodes []*Node, sType Sorter)
- func Write(hash string, d []byte) (int, error)
- type BlockInfo
- type Node
- func (nd *Node) BlockWithOffset(offset int64) string
- func (nd *Node) Blocks() []BlockInfo
- func (nd *Node) Children() []*Node
- func (nd *Node) ChildrenSorted(sorter Sorter) []*Node
- func (nd *Node) Exists() bool
- func (nd *Node) IsDir() bool
- func (nd *Node) MTime() time.Time
- func (nd *Node) Mode() os.FileMode
- func (nd *Node) Move(newParentId string) error
- func (nd *Node) Name() string
- func (nd *Node) NodeInfo() NodeInfo
- func (nd *Node) Parent() *Node
- func (nd *Node) ReadSeeker() *NodeSeeker
- func (nd *Node) SetMode(newMode os.FileMode) error
- func (nd *Node) SetName(newName string) error
- func (nd *Node) Size() (sz int64)
- func (nd *Node) String() string
- func (nd *Node) Touch(newTime time.Time) error
- func (nd *Node) Type() string
- func (nd *Node) Update(info NodeInfo) error
- func (nd *Node) WriteData(data []byte, offset int64) error
- type NodeGraph
- type NodeInfo
- type NodeSeeker
- type Sorter
Constants ¶
View Source
const ( BYTE = 1 << (iota * 10) KILOBYTE MEGABYTE GIGABTYE TERABYTE BLOCK_SIZE = MEGABYTE )
View Source
const RootNodeId = "rootNode"
Variables ¶
This section is empty.
Functions ¶
func LocationOnDisk ¶
func SizeOnDisk ¶
Types ¶
type Node ¶
type Node struct { Id string // contains filtered or unexported fields }
func (*Node) BlockWithOffset ¶
func (*Node) Children ¶
Return the logical children of this node, i.e, all nodes from which an incoming edge is pointed at this node.
func (*Node) ChildrenSorted ¶
func (*Node) Parent ¶
Return the logical parent of this node, i.e. the node id with an incoming parent edge from this node.
func (*Node) ReadSeeker ¶
func (nd *Node) ReadSeeker() *NodeSeeker
type NodeGraph ¶
func (*NodeGraph) NodeWithId ¶
func (*NodeGraph) NodeWithName ¶
func (*NodeGraph) RemoveNode ¶
type NodeSeeker ¶
type NodeSeeker struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.