commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M. Sillano" <sill...@mclink.it>
Subject [VFS] FTP problems
Date Sat, 10 Feb 2007 12:38:41 GMT
Hi everyone,

using ncommons-vfs-20070117 <cid:part1.00010008.07080004@mclink.it> I 
wote a "dir" like function, accepting wildcards:
------------------------------
 private String getVFileTree( String fi){
1.       String s="";
2.       FileSystemManager fsManager = VFS.getManager(); 
3.       FileObject fo = fsManager.resolveFile( fi );
4.       String    Mask = fo.getName().getBaseName();
5.       fo = fo.getParent();
         // for test only
5.bis          System.out.println(fo.getType());
          //
6.      FileObject fd[] = fo.findFiles(new DirSelector());
7.      if (fd != null)
8.          for (int i= 0; i< fd.length; i++){
              // omissis.... recursive dir processing  
              }
9.     FileObject fx[] = fo.findFiles(new WildCSelector(Mask)); 
10.    if (fx != null)
11.          for (int i= 0; i< fx.length; i++){
              // omissis.... here file processing  
              }
12.   return s;
  }
__________________________________________
That works fine in fallowing cases:

a) "C:/some_dir/dir/*.xsl"
b) "zip:file:///C:/java-tests/pro-xsknife/STORE/vftree/testfs.zip!/*"
c) "zip:ftp://ftp.ftpx.com/pub/ftpx/ftpx.zip!/*"

But dont works using the URI:
d)  "ftp://ftp.ftpx.com/pub/ftpx/*"   (note: same FTP public server as c 
sample)
----------------------------------
The only strange thing is in line (5.bis):
i get "IMAGINARY" and not "FOLDER" as expected. (the URI is 
ftp://ftp.ftpx.com/pub/ftpx ).
----------------------------------
Any idea?
If anyone can help me, I will be very grateful.
Thanks !

- Marco Sillano


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message