MCPcopy
hub / github.com/moonD4rk/HackBrowserData / NewSession

Function NewSession

filemanager/session.go:18–24  ·  view source on GitHub ↗

NewSession creates a session with a unique temporary directory.

()

Source from the content-addressed store, hash-verified

16
17// NewSession creates a session with a unique temporary directory.
18func NewSession() (*Session, error) {
19 dir, err := os.MkdirTemp("", "hbd-*")
20 if err != nil {
21 return nil, fmt.Errorf("create temp dir: %w", err)
22 }
23 return &Session{tempDir: dir}, nil
24}
25
26// TempDir returns the session's temporary directory path.
27func (s *Session) TempDir() string {

Callers 15

WriteArchiveFunction · 0.92
extractMethod · 0.92
countMethod · 0.92
extractMethod · 0.92
countMethod · 0.92
ExportKeysMethod · 0.92
extractMethod · 0.92
countMethod · 0.92
TestAcquireFilesFunction · 0.92
TestNewSessionFunction · 0.85

Calls 1

ErrorfMethod · 0.80

Tested by 9

TestAcquireFilesFunction · 0.74
TestNewSessionFunction · 0.68
TestSession_CleanupFunction · 0.68
TestSession_Acquire_FileFunction · 0.68
TestSession_Acquire_WALFunction · 0.68
TestSession_Acquire_DirFunction · 0.68