Types & enums
Complete type reference — interfaces, enums, and classes exported from
@cetapod/react-native-smb.
No types match your search.
Interfaces
SmbCredentials
interface
Authentication credentials passed to connect and initialize.
| Field | Type | Description |
|---|---|---|
username | string | SMB username |
password | string | SMB password |
SmbConnectionInfo
interface
Returned by connect() and connectShare().
| Field | Type | Description |
|---|---|---|
url | string | Full connection URL |
server | string | Server hostname or IP |
share | string | Mounted share name |
isConnected | boolean | Connection active |
SmbFileInfo
interface
File or directory metadata from listDirectory() and getPathInfo().
| Field | Type | Description |
|---|---|---|
name | string | Base name |
path | string | Full SMB path |
size | number | Size in bytes |
isDirectory | boolean | Directory flag |
modifiedAt | number | Unix timestamp (seconds) |
accessedAt | number | Last access time |
createdAt | number | Creation time |
changedAt | number | Metadata change time |
childCount | number? | Direct children count |
children | SmbFileInfo[]? | Nested entries (recursive list) |
SmbTaskState
interface
Live snapshot from subscribe() and get().
| Field | Type | Description |
|---|---|---|
taskId | string | Task identifier |
kind | SmbOperatorKind | Operation type |
status | TaskStatus | Current status |
determinate | boolean | Progress is 0–1 ratio |
progress | number | 0–1 completion |
bytesDone | number | Bytes transferred |
totalBytes | number | Total bytes expected |
bytesPerSecond | number | Current throughput |
etaSeconds | number | Estimated time remaining |
sourcePath | string | Source path (transfers) |
destinationPath | string | Destination path (transfers) |
errorCode | number | Error code on failure |
errorMessage | string | Human-readable error |
startedAt | number | Start timestamp (ms) |
updatedAt | number | Last update (ms) |
endedAt | number | End timestamp (ms) |
PoolInfo / PoolSlotInfo
interface
Connection pool diagnostics from getPoolInfo().
| PoolInfo field | Type | Description |
|---|---|---|
poolSize | number | Total slots (4) |
slots | PoolSlotInfo[] | Per-slot state |
| PoolSlotInfo field | Type | Description |
|---|---|---|
index | number | Slot index 0–3 |
interactiveOnly | boolean | Slot 0 flag |
state | SlotState | Idle / Assigned / Activating |
isConnected | boolean | TCP session active |
shareName | string | Mounted share |
taskId | string | Current task ID |
kind | SmbOperatorKind | Current operator |
SmbSecurityDescriptor / SmbAcl / SmbAce
interface
Windows ACL from getSecurityDescriptor().
| SmbSecurityDescriptor | Type | Description |
|---|---|---|
revision | number | SD revision |
control | string[] | Control flags |
ownerSid | string | Owner SID |
groupSid | string | Group SID |
dacl | SmbAcl | Discretionary ACL |
| SmbAce | Type | Description |
|---|---|---|
aceType | string | ACE type |
aceFlags | string[] | Inheritance flags |
mask | string[] | Permission mask |
sid | string | Trustee SID |
PathComponents
interface
Result of splitPath() utility.
| Field | Type | Description |
|---|---|---|
parentDirectory | string | Parent path |
baseFileName | string | Name without extension |
extension | string | Extension with dot |
fullFileName | string | Complete filename |
Enums
TaskStatus
enum
| Member | Value | Description |
|---|---|---|
Idle | 0 | Not started |
Pending | 1 | Queued |
Running | 2 | In progress |
Success | 3 | Completed |
Error | 4 | Failed |
Cancelled | 5 | Aborted by user |
SmbError
enum
Error codes on SmbTaskError.code.
| Member | Value | Category |
|---|---|---|
Unknown | 0 | General |
Cancelled | 1 | General |
InvalidArgument | 100 | Argument |
NotFound | 101 | Filesystem |
AlreadyExists | 102 | Filesystem |
AccessDenied | 103 | Filesystem |
NotDirectory | 104 | Filesystem |
IsDirectory | 105 | Filesystem |
DirectoryNotEmpty | 106 | Filesystem |
NotConnected | 200 | Connection |
ConnectionRefused | 201 | Connection |
TimedOut | 202 | Connection |
Busy | 300 | Resource |
NoSpace | 301 | Resource |
Io | 302 | Resource |
SmbOperatorKind
enum
Identifies the operation type on a task or pool slot.
| Member | Value | Acquire mode |
|---|---|---|
Initialize | 0 | — |
Connect | 1 | — |
ConnectShare | 2 | — |
Disconnect | 3 | — |
ListShares | 4 | Interactive |
ListDirectory | 5 | Interactive / Metadata* |
GetPathInfo | 6 | Interactive |
GetSecurityDescriptor | 7 | Interactive |
DownloadFile | 8 | Metadata |
UploadFile | 9 | Metadata |
CreateDirectory | 10 | Interactive |
DeleteItem | 11 | Metadata |
MoveItem | 12 | Interactive |
RenameItem | 13 | Interactive |
CopyItem | 14 | Metadata |
DuplicateItem | 15 | Metadata |
* ListDirectory uses Interactive for shallow lists, Metadata when recursive.
SlotState
enum
| Member | Value | Description |
|---|---|---|
Idle | 0 | No task assigned |
Assigned | 1 | Task holding slot |
Activating | 2 | Connecting session |
Classes
SmbTask<T>
class
Handle for one native async operation. See Task model.
| Member | Type | Description |
|---|---|---|
id | string | Task identifier (readonly) |
progress | number | 0–1 getter (after subscribe) |
status | TaskStatus | Status getter (after subscribe) |
result() | Promise<T> | Await typed result |
subscribe(listener?) | () => void | Subscribe; returns unsubscribe |
cancel() | void | Abort operation |
get() | SmbTaskState | null | One-shot snapshot |
SmbTask.settleAll(tasks) | static | Promise.allSettled over results |
SmbTaskError
class
Thrown when task.result() rejects. Extends Error.
| Field | Type | Description |
|---|---|---|
code | SmbError | Structured error code |
taskId | string? | Associated task ID |
message | string | Human-readable message |