commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Xin <xinxi...@gmail.com>
Subject VFS and SMB file provider question
Date Tue, 31 May 2011 07:03:05 GMT
Hi, All

I'm new to VFS, and I'm trying to use VFS and SMB file provider to access
Windows smb shares. I can use JCIFS to access my shares directly, but when I
was working with VFS, I always got an error message like
"*org.apache.commons.vfs2.FileSystemException:
Could not determine the type of file "smb://192.168.0.104/Work/"*"

Here's the code that I used to access shares.

                        fsm = VFS.getManager();
FileObject smbFile = fsm.resolveFile( "smb://192.168.0.104/Work" );
FileObject files[] = smbFile.getChildren();

I can successfully access the local file system without problems.

Thanks,

Alex

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message