dart_smb2 library

Fast, stable SMB2/3 client for Dart — powered by libsmb2.

Exposes four layers of abstraction:

  • Smb2Client — synchronous FFI client for use inside isolates.
  • Smb2Isolate — async isolate wrapper for single-connection use.
  • Smb2Pool — multi-worker pool with round-robin dispatch and auto-reconnect.
  • CachedSmb2Pool — TTL-based caching layer over Smb2Pool.

Classes

CachedSmb2Pool
An optional caching layer over Smb2Pool.
Smb2Client
SMB2/3 client powered by libsmb2 via a C wrapper and Dart FFI.
Smb2DirEntry
A directory entry returned by Smb2Client.listDirectory.
Smb2Isolate
Async wrapper that runs Smb2Client in a dedicated Dart isolate.
Smb2Pool
A pool of SMB2 worker isolates for non-blocking parallel operations.
Smb2PoolHandle
Opaque handle to an open file on a specific worker.
Smb2ShareInfo
Information about an SMB share returned by Smb2Client.listShares.
Smb2ShareType
SMB share type constants.
Smb2Stat
File or directory metadata returned by Smb2Client.stat and Smb2Client.listDirectory.
Smb2StatVfs
Filesystem statistics returned by Smb2Client.statvfs.

Enums

Smb2ErrorType
Semantic error categories mapped from POSIX errno values.
Smb2FileType
SMB2 file type.
Smb2Version
SMB protocol version to negotiate during connection.

Exceptions / Errors

Smb2Exception
Exception thrown when an SMB2 operation fails.