Documentation ¶
Index ¶
- type FileTypeStatsDB
- func (f *FileTypeStatsDB) Close()
- func (f *FileTypeStatsDB) CommitBatch(batchBuffer *types.FTypeStatsBatch) error
- func (f *FileTypeStatsDB) DbFileName() string
- func (f *FileTypeStatsDB) DeleteFileStats(path string) error
- func (f *FileTypeStatsDB) DeleteOlderThan(t time.Time) error
- func (f *FileTypeStatsDB) DeleteOlderThanWithPrefix(t time.Time, prefix string) error
- func (f *FileTypeStatsDB) FTDumpPaths(paths []string) (*[]types.FTypeStat, error)
- func (f *FileTypeStatsDB) FTStatsSum(paths []string) (types.FileTypeStats, error)
- func (f *FileTypeStatsDB) Open() error
- func (f *FileTypeStatsDB) UpdateFilePath(from, to string) error
- func (f *FileTypeStatsDB) UpdateFileStats(path, filecat string, size uint64) error
- func (f *FileTypeStatsDB) UpdateFileStatsMulti(path, filecat string, size uint64, batchBuffer *types.FTypeStatsBatch) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileTypeStatsDB ¶
func New ¶
func New(file string, create bool) (*FileTypeStatsDB, error)
New returns a DB instance to the sqlite db in existing file or creates it if it doesn't exist and create==true
func (*FileTypeStatsDB) Close ¶
func (f *FileTypeStatsDB) Close()
func (*FileTypeStatsDB) CommitBatch ¶ added in v0.8.0
func (f *FileTypeStatsDB) CommitBatch(batchBuffer *types.FTypeStatsBatch) error
func (*FileTypeStatsDB) DbFileName ¶
func (f *FileTypeStatsDB) DbFileName() string
func (*FileTypeStatsDB) DeleteFileStats ¶
func (f *FileTypeStatsDB) DeleteFileStats(path string) error
DeleteFileStats deletes the file/dir in path, if it's a dir, the delete is recursive
func (*FileTypeStatsDB) DeleteOlderThan ¶
func (f *FileTypeStatsDB) DeleteOlderThan(t time.Time) error
DeleteOlderThan deletes all entries older than (i.e. not updated after) t
func (*FileTypeStatsDB) DeleteOlderThanWithPrefix ¶
func (f *FileTypeStatsDB) DeleteOlderThanWithPrefix(t time.Time, prefix string) error
DeleteOlderThanWithPrefix deletes all entries older than (i.e. not updated after) t
func (*FileTypeStatsDB) FTDumpPaths ¶ added in v0.8.0
func (f *FileTypeStatsDB) FTDumpPaths(paths []string) (*[]types.FTypeStat, error)
FTDumpPaths returns all paths and raw info selected by the paths argument
func (*FileTypeStatsDB) FTStatsSum ¶
func (f *FileTypeStatsDB) FTStatsSum(paths []string) (types.FileTypeStats, error)
FTStatsSum returns the summary FileTypeStats for the given paths as a map of FTypeStat per File Type
func (*FileTypeStatsDB) Open ¶
func (f *FileTypeStatsDB) Open() error
func (*FileTypeStatsDB) UpdateFilePath ¶
func (f *FileTypeStatsDB) UpdateFilePath(from, to string) error
UpdateFilePath updates the file path(s), which needs to happen on a file move if path is a dir the update is recursive
func (*FileTypeStatsDB) UpdateFileStats ¶
func (f *FileTypeStatsDB) UpdateFileStats(path, filecat string, size uint64) error
UpdateFileStats upserts the file in path with size
func (*FileTypeStatsDB) UpdateFileStatsMulti ¶ added in v0.8.0
func (f *FileTypeStatsDB) UpdateFileStatsMulti(path, filecat string, size uint64, batchBuffer *types.FTypeStatsBatch) error