Example #1
0
func NewMirrorFS(path string) *MirrorFS {
	fs := &MirrorFS{
		path: path,
	}
	fs.root = fs.newDir(path, os.ModeDir|DEF_MODE)
	if fs.root.attr.Inode != 1 {
		panic("Root node should have been assigned id 1")
	}
	return fs
}
Example #2
0
File: fs.go Project: ligadous/logfs
func NewLogFS(path string) *LogFS {
	log.Printf("** Start mount Log FS (%s)", path)

	fs := &LogFS{
		path: path,
	}
	fs.root = fs.newDir(path, os.ModeDir|DEF_MODE)
	if fs.root.attr.Inode != 1 {
		panic("O Root must receive id 1")
	}
	return fs
}