FileDocCategorySizeDatePackage
ShortcutFileSystemView.javaAPI DocExample1541Mon Jan 09 11:01:58 GMT 2006None

ShortcutFileSystemView

public class ShortcutFileSystemView extends FileSystemView

Fields Summary
Constructors Summary
Methods Summary
public java.io.FilecreateNewFolder(java.io.File dir)

        return null;
    
public java.io.File[]getFiles(java.io.File dir, boolean useFileHiding)

        if(isDirLink(dir)) {
            dir =  getRealFile(dir);
        }
        
        return super.getFiles(dir,useFileHiding);
    
private java.io.FilegetRealFile(java.io.File file)

       try {
           return new File(new LnkParser(file).getRealFilename());
       } catch (Exception ex) {
           System.out.println("ex: " + ex);
           ex.printStackTrace();
           return null;
       }
    
private booleanisDirLink(java.io.File f)

        try {
            if(f.getName().toLowerCase().endsWith(".lnk")) {
                if(new LnkParser(f).isDirectory()) {
                    return true;
                }
            }
        } catch (Exception ex) {
            System.out.println("ex: " + ex);
            ex.printStackTrace();
        }
        return false;
    
public java.lang.BooleanisTraversable(java.io.File f)

        if(isDirLink(f)) {
            return new Boolean(true);
        }
        return super.isTraversable(f);
    
public static voidp(java.lang.String str)

        System.out.println(str);