filemanager

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	// contains filtered or unexported fields
}

Session manages temporary files for a single browser extraction run. It creates an isolated temp directory and provides methods to copy browser files into it. Call Cleanup() when done to remove all temp files.

func NewSession

func NewSession() (*Session, error)

NewSession creates a session with a unique temporary directory.

func (*Session) Acquire

func (s *Session) Acquire(src, dst string, isDir bool) error

Acquire copies a browser file (or directory) from src to dst. For regular files, it also copies SQLite WAL and SHM companion files if they exist. For directories (e.g. LevelDB), it copies the entire directory while skipping lock files.

On Windows, if the normal copy fails (e.g. file locked by Chrome), it falls back to DuplicateHandle + FileMapping to bypass exclusive locks.

func (*Session) Cleanup

func (s *Session) Cleanup()

Cleanup removes the session's temporary directory and all its contents.

func (*Session) TempDir

func (s *Session) TempDir() string

TempDir returns the session's temporary directory path.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL