Changeset 4377


Ignore:
Timestamp:
2003-05-28T11:14:58+12:00 (21 years ago)
Author:
jmt12
Message:

Added isFileSystemRoot() method - John

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/file/FileNode.java

    r4366 r4377  
    9797        // If the file is non-null but doesn't exist (as is the case for removable media), return true anyway.
    9898        if(file != null) {
    99             if(FileSystemView.getFileSystemView().isFileSystemRoot(file)) {
     99            if(isFileSystemRoot()) {
    100100            allows_children = TRUE;
    101101            }
     
    140140    int size = 0;
    141141    // We don't automatically map if this is a system root, or we risk the 50,000 Disk not found error messages of death.
    142     if(FileSystemView.getFileSystemView().isFileSystemRoot(file)) {
     142    if(isFileSystemRoot()) {
    143143        size = 1; // Size is always non-zero for a system root
    144144    }
     
    214214    public boolean isReadOnly() {
    215215    return readonly;
     216    }
     217
     218    public boolean isFileSystemRoot() {
     219    boolean result = false;
     220    if(file != null) {
     221        result = FileSystemView.getFileSystemView().isFileSystemRoot(file);
     222    }
     223    return result;
    216224    }
    217225
     
    299307    public String toString() {
    300308    if(title == null) {
    301         if(FileSystemView.getFileSystemView().isFileSystemRoot(file)) {
     309        if(isFileSystemRoot()) {
    302310        title = file.getAbsolutePath();
    303311        }
Note: See TracChangeset for help on using the changeset viewer.