/**
* Get the all the filenames with absolute path
* All the files fullpath will be store in vector
* @return the path name
*/
public static void getFilesRecursive(File dir,Vector v)
{
if(dir.isDirectory())
{
String path = dir.getAbsolutePath();
String sub[] = dir.list();
for(int i = 0;i<sub.length;i++)
{
File f = new File(path + File.separator + sub[i]);
getFilesRecursive(f,v);
}
}
else
{ String tmp = dir.getAbsolutePath();
v.add(tmp);
//System.out.println(tmp);
} }
* Get the all the filenames with absolute path
* All the files fullpath will be store in vector
* @return the path name
*/
public static void getFilesRecursive(File dir,Vector v)
{
if(dir.isDirectory())
{
String path = dir.getAbsolutePath();
String sub[] = dir.list();
for(int i = 0;i<sub.length;i++)
{
File f = new File(path + File.separator + sub[i]);
getFilesRecursive(f,v);
}
}
else
{ String tmp = dir.getAbsolutePath();
v.add(tmp);
//System.out.println(tmp);
} }
String s[] = {};
if( fp.isDirectory() ) {
s = fp.list();
}
for( int i = 0; i < s.length; i ++ ) {
JOptionPane.showMessageDialog( this.getOwner(), s[i] );
}
File[] fileList = FileSystemView.getFileSystemView().getFiles(new File("目录名"),true);