Lines Matching defs:dir

339      * Is dir the root of a tree in the file system, such as a drive
342 * @param dir a <code>File</code> object representing a directory
347 public boolean isFileSystemRoot(File dir) {
348 return ShellFolder.isFileSystemRoot(dir);
357 * @param dir a directory
361 public boolean isDrive(File dir) {
367 * for a floppy disk. Implies isDrive(dir).
371 * @param dir a directory
375 public boolean isFloppyDrive(File dir) {
385 * @param dir a directory
389 public boolean isComputerNode(File dir) {
390 return ShellFolder.isComputerNode(dir);
437 * Returns a File object constructed in dir from the given filename.
439 public File createFileObject(File dir, String filename) {
440 if(dir == null) {
443 return new File(dir, filename);
462 public File[] getFiles(File dir, boolean useFileHiding) {
465 // add all files in dir
466 if (!(dir instanceof ShellFolder)) {
468 dir = getShellFolder(dir);
474 File[] names = ((ShellFolder) dir).listFiles(!useFileHiding);
512 * Returns the parent directory of <code>dir</code>.
513 * @param dir the <code>File</code> being queried
514 * @return the parent directory of <code>dir</code>, or
515 * <code>null</code> if <code>dir</code> is <code>null</code>
517 public File getParentDirectory(File dir) {
518 if (dir == null || !dir.exists()) {
525 sf = getShellFolder(dir);
640 public boolean isFileSystemRoot(File dir) {
641 return dir != null && dir.getAbsolutePath().equals("/");
644 public boolean isDrive(File dir) {
645 return isFloppyDrive(dir);
648 public boolean isFloppyDrive(File dir) {
651 // return (dir != null && dir.getAbsolutePath().toLowerCase().startsWith("/floppy"));
655 public boolean isComputerNode(File dir) {
656 if (dir != null) {
657 String parent = dir.getParent();
749 public boolean isDrive(File dir) {
750 return isFileSystemRoot(dir);
753 public boolean isFloppyDrive(final File dir) {
756 return dir.getAbsolutePath();