Improved data structure for structs.

Thanks gopls with VS Code
This commit is contained in:
Caleb Gardner
2020-12-28 11:50:56 -06:00
parent 89ec7eb0fb
commit 47c28baf87
4 changed files with 14 additions and 13 deletions
+8 -7
View File
@@ -30,13 +30,14 @@ var (
//
//Implements os.FileInfo and io.ReadCloser
type File struct {
Parent *File //The parent directory. Should ALWAYS be a folder. If it's the root directory, will be nil
Reader io.Reader //Underlying reader. When writing, will probably be an os.File. When reading this is kept nil UNTIL reading to save memory.
name string //The name of the file or folder. Root folder will not have a name ("")
path string //The path to the folder the File is located in.
r *Reader //The squashfs.Reader where this file is contained.
in *inode.Inode //Underlyting inode when reading.
filType int //The file's type, using inode types.
Reader io.Reader
Parent *File
r *Reader //Underlying reader. When writing, will probably be an os.File. When reading this is kept nil UNTIL reading to save memory.
in *inode.Inode
name string
path string
filType int //The file's type, using inode types.
}
//get a File from a directory.entry