Logo Search packages:      
Sourcecode: jabref-plugin-oo version File versions  Download package

static File net::sf::jabref::oo::AutoDetectPaths::findProgramFilesDir (  )  [inline, static, private]

Search for Program files directory.

Returns:
the File pointing to the Program files directory, or null if not found. Since we are not including a library for Windows integration, this method can't find the Program files dir in localized Windows installations.

Definition at line 243 of file AutoDetectPaths.java.

                                              {
        File root = new File("C:\\");
        File[] dirs = root.listFiles(new FileFilter() {
            public boolean accept(File file) {
                return file.isDirectory();
            }
        });
        for (int i = 0; i < dirs.length; i++) {
            File dir = dirs[i];
            if (dir.getName().toLowerCase().equals("program files"))
                return dir;
        }
        return null;
    }


Generated by  Doxygen 1.6.0   Back to index