Documentation ¶
Index ¶
- func G4FS_Exit(obj *G4FScore)
- func G4FS_New(remote string, cluster string, divsize int, maxfptr int) error
- func G4FS_Rebuild(remote string, pw []byte, kf []byte) error
- func PEVFS_Exit(obj *PEVFS)
- func PEVFS_New(remote string, cluster string, chunksize int) error
- func PEVFS_Rebuild(remote string, pw []byte, kf []byte) error
- func Test_Basic(remote string) (float64, float64, float64)
- func Test_IO(remote string) (float64, float64, float64)
- func Test_Multi(remote string) (float64, float64, float64)
- type G4FScore
- func (tbox *G4FScore) Abort(reset bool, abort bool, working bool) (bool, bool)
- func (tbox *G4FScore) AccExtend(pw []byte, kf []byte, hint []byte, account string, wrlocked bool) (string, error)
- func (tbox *G4FScore) AccReset(pw []byte, kf []byte, hint []byte) error
- func (tbox *G4FScore) Debug() ([]int, [][]byte)
- func (tbox *G4FScore) Delete(names []string) error
- func (tbox *G4FScore) DirLock(name string, islocked bool, sub bool) error
- func (tbox *G4FScore) DirNew(names []string) error
- func (tbox *G4FScore) ExBin(name string) ([]byte, error)
- func (tbox *G4FScore) ExDir(name string) error
- func (tbox *G4FScore) ExFiles(names []string) error
- func (tbox *G4FScore) ImBin(name string, data []byte) error
- func (tbox *G4FScore) ImDir(path string) error
- func (tbox *G4FScore) ImFiles(paths []string) error
- func (tbox *G4FScore) Info(path string, wrlocked bool, moreinfo bool) *G4Finfo
- func (tbox *G4FScore) Log(reset bool) string
- func (tbox *G4FScore) Login(pw []byte, kf []byte, sleeptime int) error
- func (tbox *G4FScore) Move(names []string, dst string) error
- func (tbox *G4FScore) Navigate(path string, abspath bool) bool
- func (tbox *G4FScore) Print(wrlocked bool) string
- func (tbox *G4FScore) Rename(before []string, after []string) error
- func (tbox *G4FScore) Restore(mode bool) (int, error)
- func (tbox *G4FScore) Search(name string) []string
- type G4FSshell
- type G4Finfo
- type PEVFS
- func (tbox *PEVFS) Abort(reset bool, abort bool, working bool) (bool, bool)
- func (tbox *PEVFS) AccExtend(pw []byte, kf []byte, hint []byte, account string, wrlocked bool) (string, error)
- func (tbox *PEVFS) AccReset(pw []byte, kf []byte, hint []byte) error
- func (tbox *PEVFS) CluCheck() (int, error)
- func (tbox *PEVFS) CluRestore(rename bool, rewrite bool, rebuild bool) (int, error)
- func (tbox *PEVFS) Debug() ([]int, [][]byte)
- func (tbox *PEVFS) Delete(paths []string) error
- func (tbox *PEVFS) DirLock(path string, islocked bool, sub bool) error
- func (tbox *PEVFS) DirNew(names []string) error
- func (tbox *PEVFS) ExBin(name string) ([]byte, error)
- func (tbox *PEVFS) ExDir(path string) error
- func (tbox *PEVFS) ExFiles(names []string) error
- func (tbox *PEVFS) ImBin(name string, data []byte) error
- func (tbox *PEVFS) ImDir(path string) error
- func (tbox *PEVFS) ImFiles(paths []string) error
- func (tbox *PEVFS) Log(reset bool) string
- func (tbox *PEVFS) Login(pw []byte, kf []byte, sleeptime int) error
- func (tbox *PEVFS) Move(names []string, dst string) error
- func (tbox *PEVFS) NavInfo(wrlocked bool) ([]string, []int, []int, []int, []int)
- func (tbox *PEVFS) NavName() ([]string, []bool)
- func (tbox *PEVFS) Print(wrlocked bool) string
- func (tbox *PEVFS) Rename(before []string, after []string) error
- func (tbox *PEVFS) Search(name string) []string
- func (tbox *PEVFS) Teleport(path string) bool
- type Shell
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func G4FS_Rebuild ¶
regenerate fphykey, rename files
func PEVFS_Rebuild ¶
regenerate fphykey, rewrite control blocks
func Test_Basic ¶
cluster generation, basic 4GiB read/write
Types ¶
type G4FScore ¶
type G4FScore struct { Curpath string // empty str if Curdir is nil Curdir *vdir // current folder Rootpath string // path of root folder (*/) -readonly const Cluster *string // cluster name -readonly const Account *string // account name (root : RW, else : R) -readonly const // contains filtered or unexported fields }
kv4adv filesystem core
func G4FS_Boot ¶
func G4FS_Boot(desktop string, local string, remote string, blockApath string) (*G4FScore, []byte, error)
boot with cluster, init internal data & local/, returns (G4FScore, hint)
func (*G4FScore) AccExtend ¶
func (tbox *G4FScore) AccExtend(pw []byte, kf []byte, hint []byte, account string, wrlocked bool) (string, error)
extend account (curdir becomes new rootdir), returns new block A header path at desktop
func (*G4FScore) Debug ¶
debug info return : [divsize, maxfptr, last fptr], [wrsign(8B), salt(64B), pwhash(192B), fsyskey(48B), fkeykey(48B), fphykey(48B)]
func (*G4FScore) DirLock ¶
change lock status of name folder to islocked, changes all subdir if sub T, empty string to change curdir
func (*G4FScore) DirNew ¶
generate new folder at Curdir(->tgtdir), cannot make empty or overlapping names
func (*G4FScore) ExDir ¶
export name folder (empty string to export curdir), !! generate desktop/kv5export/ !!
func (*G4FScore) ExFiles ¶
export files under Curdir(->tgtdir), find by name, !! generate desktop/kv5export/ !!
func (*G4FScore) ImBin ¶
import binary data under Curdir(->tgtdir), file will be replaced if path exists
func (*G4FScore) ImFiles ¶
import files under Curdir(->tgtdir), file will be replaced if path exists
func (*G4FScore) Move ¶
move dir/files in Curdir(->tgtdir) to dst folder, return error if hierarchy problem is detected
func (*G4FScore) Navigate ¶
set Curdir to input path (~/), Curdir will not change if path not exist, returns T if find success
type G4FSshell ¶
type G4FSshell struct { // worker modules InSys *G4FScore // kv4adv worker session AsyncErr string // error result of async work IOstr []string // IO string buffer (manual access) IObyte [][]byte // IO []byte buffer (manual access) // readonly & path values FlagWk bool // isworking flag FlagRo bool // readonly cluster flag CurPath string // full path of current session CurInfo *G4Finfo // curdir info // contains filtered or unexported fields }
wrapper of G4FScore, never panics
type G4Finfo ¶
type G4Finfo struct { Self_name string Self_time string Self_size int // moreinfo Self_locked bool Self_subdir int // moreinfo Self_subfile int // moreinfo Dir_name []string Dir_time []string Dir_size []int // moreinfo Dir_locked []bool File_name []string File_time []string File_size []int File_fptr []int }
vdir info (for readonly)
type PEVFS ¶
type PEVFS struct { Curpath string // empty str if Curdir is nil Curdir *vdir // current folder Rootpath string // path of root folder (*/) -readonly const Cluster *string // cluster name -readonly const Account *string // account name (root : RW, else : R) -readonly const // contains filtered or unexported fields }
personal encrypted virtual file system
func PEVFS_Boot ¶
func PEVFS_Boot(desktop string, local string, remote string, blockApath string) (*PEVFS, []byte, error)
boot with cluster, init internal data & local/, returns (PEVFS, hint)
func (*PEVFS) AccExtend ¶
func (tbox *PEVFS) AccExtend(pw []byte, kf []byte, hint []byte, account string, wrlocked bool) (string, error)
extend account (curdir becomes new rootdir), returns new block A header path at desktop
func (*PEVFS) CluRestore ¶
rename : check/fix name, rewrite : reset unallocated chunk, rebuild : check/fix file system
func (*PEVFS) Debug ¶
debug info return : [chunksize, blocknum, first fptr], [wrsign(8B), salt(64B), pwhash(192B), fsyskey(48B), fkeykey(48B), fphykey(48B)]
func (*PEVFS) DirNew ¶
generate new folder at Curdir(->tgtdir), cannot make empty or overlapping names
func (*PEVFS) ExFiles ¶
export files under Curdir(->tgtdir), find by name, !! generate desktop/kv5export/ !!
func (*PEVFS) ImBin ¶
import binary data under Curdir(->tgtdir), file will be replaced if path exists
func (*PEVFS) Move ¶
move dir/files in Curdir(->tgtdir) to dst folder, return error if hierarchy problem is detected, ! reset cachedir !
type Shell ¶
type Shell struct { // worker modules InSys *PEVFS // pevfs worker session AsyncErr string // error result of async work IOstr []string // IO string buffer (manual access) IObyte [][]byte // IO []byte buffer (manual access) // control flags FlagWk bool // isworking flag (readonly) FlagRo bool // readonly cluster flag (readonly) FlagSz bool // update time&size of CurDir flag // info of CurDir (readonly) CurPath string // current session fullpath (~/) CurNum [2]int // number of subdir&subfile CurName []string // names of subdir&subfile CurLock []bool // islocked flag, false if file CurTime []string // formatted time of subdir&subfile CurSize []int // sizes of subdir&subfile }
wrapper of PEVFS, never panics