smb

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileReader

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

FileReader provides methods to read files from SMB shares with connection pooling

func NewFileReader

func NewFileReader(auth *config.CredentialMgr) *FileReader

NewFileReader creates a new SMB file reader with connection pooling

func (*FileReader) Close

func (fr *FileReader) Close()

Close closes all cached connections

func (*FileReader) FileExists

func (fr *FileReader) FileExists(uncPath string) (bool, error)

FileExists checks if a file exists at the given UNC path. Reuses connections when possible.

func (*FileReader) ReadFile

func (fr *FileReader) ReadFile(uncPath string) ([]byte, error)

ReadFile reads a file from a UNC path (e.g., \\server\share\path\to\file.txt) and returns its contents as a byte slice. Reuses connections when possible.

Jump to

Keyboard shortcuts

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