Made a few straggler functions private
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ var (
|
|||||||
func (r *Reader) ReadFile(location string) (*FileReader, error) {
|
func (r *Reader) ReadFile(location string) (*FileReader, error) {
|
||||||
var rdr FileReader
|
var rdr FileReader
|
||||||
rdr.r = r
|
rdr.r = r
|
||||||
in, err := r.GetInodeFromPath(location)
|
in, err := r.getInodeFromPath(location)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -9,7 +9,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
//FragmentEntry is an entry in the fragment table
|
//FragmentEntry is an entry in the fragment table
|
||||||
type FragmentEntry struct {
|
type fragmentEntry struct {
|
||||||
Start uint64
|
Start uint64
|
||||||
Size uint32
|
Size uint32
|
||||||
Unused uint32
|
Unused uint32
|
||||||
@@ -57,7 +57,7 @@ func (r *Reader) getFragmentDataFromInode(in *inode.Inode) ([]byte, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
var entry FragmentEntry
|
var entry fragmentEntry
|
||||||
err = binary.Read(fragEntryRdr, binary.LittleEndian, &entry)
|
err = binary.Read(fragEntryRdr, binary.LittleEndian, &entry)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ func (r *Reader) getInodeFromEntry(en *directory.Entry) (*inode.Inode, error) {
|
|||||||
|
|
||||||
//GetInodeFromPath returns the inode at the given path, relative to root.
|
//GetInodeFromPath returns the inode at the given path, relative to root.
|
||||||
//The given path can start with or without "/"
|
//The given path can start with or without "/"
|
||||||
func (r *Reader) GetInodeFromPath(path string) (*inode.Inode, error) {
|
func (r *Reader) getInodeFromPath(path string) (*inode.Inode, error) {
|
||||||
path = strings.TrimSuffix(strings.TrimPrefix(path, "/"), "/")
|
path = strings.TrimSuffix(strings.TrimPrefix(path, "/"), "/")
|
||||||
pathDirs := strings.Split(path, "/")
|
pathDirs := strings.Split(path, "/")
|
||||||
rdr, err := r.newMetadataReaderFromInodeRef(r.super.RootInodeRef)
|
rdr, err := r.newMetadataReaderFromInodeRef(r.super.RootInodeRef)
|
||||||
|
|||||||
Reference in New Issue
Block a user