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.

FieldTypeDescription
usernamestringSMB username
passwordstringSMB password
SmbConnectionInfo interface

Returned by connect() and connectShare().

FieldTypeDescription
urlstringFull connection URL
serverstringServer hostname or IP
sharestringMounted share name
isConnectedbooleanConnection active
SmbShareList interface

One entry from listShares().

FieldTypeDescription
namestringShare name
commentstringShare description
SmbFileInfo interface

File or directory metadata from listDirectory() and getPathInfo().

FieldTypeDescription
namestringBase name
pathstringFull SMB path
sizenumberSize in bytes
isDirectorybooleanDirectory flag
modifiedAtnumberUnix timestamp (seconds)
accessedAtnumberLast access time
createdAtnumberCreation time
changedAtnumberMetadata change time
childCountnumber?Direct children count
childrenSmbFileInfo[]?Nested entries (recursive list)
SmbTaskState interface

Live snapshot from subscribe() and get().

FieldTypeDescription
taskIdstringTask identifier
kindSmbOperatorKindOperation type
statusTaskStatusCurrent status
determinatebooleanProgress is 0–1 ratio
progressnumber0–1 completion
bytesDonenumberBytes transferred
totalBytesnumberTotal bytes expected
bytesPerSecondnumberCurrent throughput
etaSecondsnumberEstimated time remaining
sourcePathstringSource path (transfers)
destinationPathstringDestination path (transfers)
errorCodenumberError code on failure
errorMessagestringHuman-readable error
startedAtnumberStart timestamp (ms)
updatedAtnumberLast update (ms)
endedAtnumberEnd timestamp (ms)
PoolInfo / PoolSlotInfo interface

Connection pool diagnostics from getPoolInfo().

PoolInfo fieldTypeDescription
poolSizenumberTotal slots (4)
slotsPoolSlotInfo[]Per-slot state
PoolSlotInfo fieldTypeDescription
indexnumberSlot index 0–3
interactiveOnlybooleanSlot 0 flag
stateSlotStateIdle / Assigned / Activating
isConnectedbooleanTCP session active
shareNamestringMounted share
taskIdstringCurrent task ID
kindSmbOperatorKindCurrent operator
SmbSecurityDescriptor / SmbAcl / SmbAce interface

Windows ACL from getSecurityDescriptor().

SmbSecurityDescriptorTypeDescription
revisionnumberSD revision
controlstring[]Control flags
ownerSidstringOwner SID
groupSidstringGroup SID
daclSmbAclDiscretionary ACL
SmbAceTypeDescription
aceTypestringACE type
aceFlagsstring[]Inheritance flags
maskstring[]Permission mask
sidstringTrustee SID
PathComponents interface

Result of splitPath() utility.

FieldTypeDescription
parentDirectorystringParent path
baseFileNamestringName without extension
extensionstringExtension with dot
fullFileNamestringComplete filename

Enums

TaskStatus enum
MemberValueDescription
Idle0Not started
Pending1Queued
Running2In progress
Success3Completed
Error4Failed
Cancelled5Aborted by user
SmbError enum

Error codes on SmbTaskError.code.

MemberValueCategory
Unknown0General
Cancelled1General
InvalidArgument100Argument
NotFound101Filesystem
AlreadyExists102Filesystem
AccessDenied103Filesystem
NotDirectory104Filesystem
IsDirectory105Filesystem
DirectoryNotEmpty106Filesystem
NotConnected200Connection
ConnectionRefused201Connection
TimedOut202Connection
Busy300Resource
NoSpace301Resource
Io302Resource
SmbOperatorKind enum

Identifies the operation type on a task or pool slot.

MemberValueAcquire mode
Initialize0
Connect1
ConnectShare2
Disconnect3
ListShares4Interactive
ListDirectory5Interactive / Metadata*
GetPathInfo6Interactive
GetSecurityDescriptor7Interactive
DownloadFile8Metadata
UploadFile9Metadata
CreateDirectory10Interactive
DeleteItem11Metadata
MoveItem12Interactive
RenameItem13Interactive
CopyItem14Metadata
DuplicateItem15Metadata

* ListDirectory uses Interactive for shallow lists, Metadata when recursive.

SlotState enum
MemberValueDescription
Idle0No task assigned
Assigned1Task holding slot
Activating2Connecting session

Classes

SmbTask<T> class

Handle for one native async operation. See Task model.

MemberTypeDescription
idstringTask identifier (readonly)
progressnumber0–1 getter (after subscribe)
statusTaskStatusStatus getter (after subscribe)
result()Promise<T>Await typed result
subscribe(listener?)() => voidSubscribe; returns unsubscribe
cancel()voidAbort operation
get()SmbTaskState | nullOne-shot snapshot
SmbTask.settleAll(tasks)staticPromise.allSettled over results
SmbTaskError class

Thrown when task.result() rejects. Extends Error.

FieldTypeDescription
codeSmbErrorStructured error code
taskIdstring?Associated task ID
messagestringHuman-readable message