Lines Matching defs:dir

353      * Is dir the root of a tree in the file system, such as a drive
356 * @param dir a <code>File</code> object representing a directory
361 public boolean isFileSystemRoot(File dir) {
362 return ShellFolder.isFileSystemRoot(dir);
371 * @param dir a directory
375 public boolean isDrive(File dir) {
381 * for a floppy disk. Implies isDrive(dir).
385 * @param dir a directory
389 public boolean isFloppyDrive(File dir) {
399 * @param dir a directory
403 public boolean isComputerNode(File dir) {
404 return ShellFolder.isComputerNode(dir);
458 * Returns a File object constructed in dir from the given filename.
460 * @param dir an abstract pathname denoting a directory
462 * @return a {@code File} object created from {@code dir} and {@code filename}
464 public File createFileObject(File dir, String filename) {
465 if(dir == null) {
468 return new File(dir, filename);
490 * @param dir the root directory of files to be returned
493 * directories in the given {@code dir}. It includes hidden
496 public File[] getFiles(File dir, boolean useFileHiding) {
499 // add all files in dir
500 if (!(dir instanceof ShellFolder)) {
502 dir = getShellFolder(dir);
508 File[] names = ((ShellFolder) dir).listFiles(!useFileHiding);
546 * Returns the parent directory of <code>dir</code>.
547 * @param dir the <code>File</code> being queried
548 * @return the parent directory of <code>dir</code>, or
549 * <code>null</code> if <code>dir</code> is <code>null</code>
551 public File getParentDirectory(File dir) {
552 if (dir == null || !dir.exists()) {
559 sf = getShellFolder(dir);
737 public boolean isFileSystemRoot(File dir) {
738 return dir != null && dir.getAbsolutePath().equals("/");
741 public boolean isDrive(File dir) {
742 return isFloppyDrive(dir);
745 public boolean isFloppyDrive(File dir) {
748 // return (dir != null && dir.getAbsolutePath().toLowerCase().startsWith("/floppy"));
752 public boolean isComputerNode(File dir) {
753 if (dir != null) {
754 String parent = dir.getParent();
849 public boolean isDrive(File dir) {
850 return isFileSystemRoot(dir);
853 public boolean isFloppyDrive(final File dir) {
856 return dir.getAbsolutePath();