Documentation ¶
Index ¶
- Constants
- type FSHeader
- func (f *FSHeader) Check(name string) bool
- func (f *FSHeader) Commit() (*FSHeader, error)
- func (f *FSHeader) Create(name string) error
- func (f *FSHeader) Delete(name string) error
- func (f *FSHeader) GetFileCount() uint
- func (f *FSHeader) GetFileList() []string
- func (f *FSHeader) GetFileListDirectory(dir string) ([]string, error)
- func (f *FSHeader) GetFileSize(name string) (uint, error)
- func (f *FSHeader) GetTotalFilesizes() int
- func (f *FSHeader) NewReader(name string) (*Reader, error)
- func (f *FSHeader) NewWriter(name string) (*Writer, error)
- func (f *FSHeader) Read(name string) ([]byte, error)
- func (f *FSHeader) StartIOController() error
- func (f *FSHeader) UnmountDB(flags FlagVal) error
- func (f *FSHeader) Write(name string, d []byte) error
- type FlagVal
- type RawFile
- type Reader
- type Writer
Constants ¶
View Source
const FS_SIGNATURE string = "govfs_header" /* Cannot exceed 64 */
View Source
const MAX_FILENAME_LENGTH int = 256
* Configurable constants
View Source
const REMOVE_FS_HEADER bool = false /* Removes the header at the beginning of the serialized file - leave false */
View Source
const STREAM_PAD_LEN int = 0 /* Length of the pad between two serialized RawFile structs */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FSHeader ¶
type FSHeader struct {
// contains filtered or unexported fields
}
func CreateDatabase ¶
* Creates or loads a filesystem database file. If the filename is nil, then create a new database * otherwise try to load an existing fs database file. * * Flags: FLAG_ENCRYPT, FLAG_COMPRESS
func (*FSHeader) GetFileCount ¶
func (*FSHeader) GetFileList ¶
func (*FSHeader) GetFileListDirectory ¶
* Retrieves the file listing in a specific directrory. NOTE: The * `dir` parameter must contain a trailing "/"
func (*FSHeader) GetTotalFilesizes ¶
func (*FSHeader) StartIOController ¶
type FlagVal ¶
type FlagVal int
const ( FLAG_FILE FlagVal = 1 << iota FLAG_DIRECTORY /* The target file is a directory */ FLAG_ENCRYPT /* Encryption on the fs serialized output */ FLAG_DB_LOAD /* Loads the database */ FLAG_DB_CREATE /* Creates the database */ FLAG_COMPRESS /* * Compresses files in the FS stream -- also used as a switch to determine * if a file should be compressed due to the chance of high entropy. If compression * takes places, then this flag is set on comp_file.Flags */ )
const IRP_BASE FlagVal = 2 /*
* Start the IRP controller ID count from n > 1.
* Altering this may break logic in the I/O controller
*/
type RawFile ¶
* The meta header for each raw file * (govfsFile is the virtual, in-memory file header)
Click to show internal directories.
Click to hide internal directories.