Skip to content

๐Ÿ—‚ SMB/CIFS Commons VFS2 Provider over jcifs-ng (Java filesystem SPI delegatee)

Notifications You must be signed in to change notification settings

umjammer/commons-vfs2-cifs

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

69 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Release Java CI CodeQL Java Parent

commons-vfs2-cifs

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"

Requirements

Project "commons-vfs2-cifs" requires:

Install

Example

// 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);

Known Issues

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.

Might also like

  • 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.

License

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.