filehelper

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 14 Imported by: 4

README

filehelper

Documentation

Index

Constants

View Source
const (
	RandPortMin = 4000
	RandPortMax = 65000
)
View Source
const UnixfsChunkSize uint64 = 1 << 20
View Source
const UnixfsLinksPerLevel = 1 << 10

Variables

This section is empty.

Functions

func BalanceNode added in v0.0.7

func BalanceNode(f io.Reader, bufDs ipld.DAGService, cidBuilder cid.Builder) (node ipld.Node, err error)

func BuildFileNode

func BuildFileNode(item Finfo, bufDs ipld.DAGService, cidBuilder cid.Builder) (node ipld.Node, err error)

func BuildFileNodeV0 added in v0.0.3

func BuildFileNodeV0(f *os.File, bufDs ipld.DAGService) (node ipld.Node, err error)

BuildFileNodeV0 - build ipld with cid v0

func ExistDir added in v0.0.2

func ExistDir(path string) bool

func FileWalkAsync

func FileWalkAsync(args []string) chan Finfo

func FileWalkAsyncWithIgnore added in v0.0.11

func FileWalkAsyncWithIgnore(args []string, ignore []string) chan Finfo

func FileWalkSync

func FileWalkSync(args []string) (fileList []string, err error)

func RandPort added in v0.0.5

func RandPort() string

Types

type FileSlice

type FileSlice struct {
	// contains filtered or unexported fields
}

func NewFileSlice added in v0.0.3

func NewFileSlice(r *os.File, offset, start, end, fileSize int64) *FileSlice

func (*FileSlice) Read

func (fs *FileSlice) Read(p []byte) (n int, err error)

type Finfo

type Finfo struct {
	Path      string
	Name      string
	Info      os.FileInfo
	SeekStart int64
	SeekEnd   int64
}

Directories

Path Synopsis
helper package for building car file of version 1
helper package for building car file of version 1

Jump to

Keyboard shortcuts

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