https://github.com/zspitzer/extension-smb
https://github.com/zspitzer/extension-smb
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zspitzer/extension-smb
- Owner: zspitzer
- License: lgpl-2.1
- Created: 2022-07-31T13:06:56.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-12-16T02:30:21.000Z (7 months ago)
- Last Synced: 2025-12-19T12:52:32.462Z (7 months ago)
- Language: Java
- Size: 15.1 MB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License.txt
Awesome Lists containing this project
README
# Lucee Extension SMB Resource Provider
[](https://github.com/lucee/extension-smb/actions/workflows/main.yml)
This extension provides SMB (Server Message Block) / CIFS (Common Internet File System) virtual file system support for Lucee, allowing you to read, write, and manipulate files on Windows network shares and Samba servers using standard CFML file functions.
## Documentation
- [Lucee Virtual File Systems](https://docs.lucee.org/guides/lucee-5/virtual-file-systems.html)
- [Working with Files and Directories](https://docs.lucee.org/guides/Various/working-with-files.html)
## Usage
Access SMB shares using the `smb://` scheme with standard CFML file functions:
```cfml
// Basic usage with credentials in URL
smbPath = "smb://username:password@server/share/path/";
// Check if directory exists
if ( directoryExists( smbPath ) ) {
// List files
files = directoryList( smbPath );
// Read a file
content = fileRead( smbPath & "document.txt" );
// Write a file
fileWrite( smbPath & "output.txt", "Hello SMB!" );
}
// With domain authentication
smbPath = "smb://DOMAIN;username:password@server/share/";
```
### URL Format
```text
smb://[domain;]username:password@host[:port]/share/path/
```
- **domain** - Optional Windows domain
- **username** - SMB username
- **password** - SMB password
- **host** - Server hostname or IP
- **port** - Optional port (default: 445)
- **share** - Share name
- **path** - Path within the share
### Supported Operations
- `directoryCreate()` / `directoryDelete()` / `directoryExists()` / `directoryList()`
- `fileRead()` / `fileWrite()` / `fileDelete()` / `fileExists()`
- `fileCopy()` / `fileMove()`
- `getFileInfo()` / `fileSetLastModified()`
## Requirements
- Lucee 6.x or later
- Java 17 or later
## Technical Details
This extension uses [jcifs-codelibs 3.0.0](https://github.com/codelibs/jcifs), a modern fork of the JCIFS library with SMB2/SMB3 support.
## Issues
[Lucee JIRA - SMB Issues](https://luceeserver.atlassian.net/issues/?jql=labels%20%3D%20smb)