Commons VFS provides a single API for accessing various different file systems. It presents a uniform view of the files from various different sources.
Project "commons-vfs2-cifs" is a SMB/CIFS provider for Commons VFS.
โ this project uses "cifs" as the vsf2 protocol name instead of "smb"
Project "commons-vfs2-cifs" requires:
- jcifs-ng library
- Java 17
// Retrieve file system manager
FileSystemManager fileManager = VFS.getManager();
// Configure authenticator
FileSystemOptions fileSystemOptions = new FileSystemOptions();
StaticUserAuthenticator userAuthenticator =
new StaticUserAuthenticator(domain, login, password);
DefaultFileSystemConfigBuilder.getInstance()
.setUserAuthenticator(fileSystemOptions, userAuthenticator);
// Resolve file object file from virtual file system
String uri = "cifs://fs/Documents";
FileObject fileObject = fileManager.resolveFile(uri, fileSystemOptions);
To date, JCIFS has always tried NetBIOS broadcast lookups in favor of DNS which frequently resulted in 6 seconds delay if the jcifs.resolveOrder property was not adjusted. This behavior has been changed to try DNS before NetBIOS broadcast lookups which should result in much less frequent delays when using default settings. To restore the old behavior, simply set jcifs.resolveOrder=LMHOSTS,BCAST,DNS.
- jconditions - Extra conditional annotations for JUnit.
- jackdaw - Java Annotation Processor which allows to simplify development.
- houdini - Type conversion system for Spring framework.
- herald - Logging annotation for Spring framework.
- caesar - Library that allows to create async beans from sync beans.
- avconv4java - Java interface to avconv tool.
Copyright 2014 Vladislav Bauer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.