Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSchema ¶
CreateSchema sets up the database tables to store the index of files and folders and additional application state.
func FolderSize ¶
FolderSize returns the size of the specified folder.
func ProcessFileStream ¶
ProcessFileStream extracts file attributes while only reading the file in once. Currently it generates a SHA512 checksum of the file contents and detects the MIME type.
Types ¶
type File ¶
type File struct { ID string `db:"id"` ParentID sql.NullString `db:"parent_id"` Hash sql.NullString `db:"hash"` Path string `db:"path"` Size int64 `db:"size"` IsDir bool `db:"is_dir"` MIMEType sql.NullString `db:"mime_type"` TimeModified time.Time `db:"time_modified"` TimeCreated time.Time `db:"time_created"` TimeIndexed time.Time `db:"time_indexed"` }
File represents an indexed file or folder in the file system.
Click to show internal directories.
Click to hide internal directories.