com.mucommander.file.impl.local
Class SpecialWindowsLocation

java.lang.Object
  extended by com.mucommander.file.AbstractFile
      extended by com.mucommander.file.DummyFile
          extended by com.mucommander.file.impl.local.SpecialWindowsLocation
All Implemented Interfaces:
PermissionAccesses, PermissionTypes

public class SpecialWindowsLocation
extends DummyFile

Represents special Windows locations such as 'My Computer', 'Network Neighborhood', 'Recycle Bin', ... as dummy AbstractFile instances, for the sole purpose of being opened with DesktopManager.

This class is totally useless on platforms other than Windows.

Author:
Maxence Bernard
See Also:
DesktopManager

Field Summary
protected  java.lang.String clsid
          A class ID
static SpecialWindowsLocation CONTROL_PANEL
          Control Panel
static SpecialWindowsLocation MY_COMPUTER
          My Computer
static SpecialWindowsLocation MY_DOCUMENTS
          My Documents
static SpecialWindowsLocation NETWORK_NEIGHBORHOOD
          Network Neighborhood
static SpecialWindowsLocation RECYCLE_BIN
          Recycle Bin
 
Fields inherited from class com.mucommander.file.AbstractFile
DEFAULT_SEPARATOR, fileURL, IO_BUFFER_SIZE, MUST_HINT, MUST_NOT_HINT, SHOULD_HINT, SHOULD_NOT_HINT, windowsDriveRootPattern
 
Fields inherited from interface com.mucommander.file.PermissionTypes
EXECUTE_PERMISSION, READ_PERMISSION, WRITE_PERMISSION
 
Fields inherited from interface com.mucommander.file.PermissionAccesses
GROUP_ACCESS, OTHER_ACCESS, USER_ACCESS
 
Constructor Summary
SpecialWindowsLocation(java.lang.String clsid)
          Creates a new special Windows location using the given CLSID (Class identifier).
 
Method Summary
 java.lang.String getAbsolutePath()
          Implementation notes: returns the CLSID (Class identifier) passed to the constructor.
 java.lang.String getName()
          Implementation notes: returns the CLSID (Class identifier) passed to the constructor.
 boolean isDirectory()
          Implementation notes: always returns true.
 
Methods inherited from class com.mucommander.file.DummyFile
canChangeDate, canGetGroup, canGetOwner, canRunProcess, changeDate, changePermission, delete, exists, getChangeablePermissions, getDate, getFreeSpace, getGroup, getInputStream, getOutputStream, getOwner, getParent, getPermissions, getRandomAccessInputStream, getRandomAccessOutputStream, getSize, getTotalSpace, getUnderlyingFileObject, hasRandomAccessInputStream, hasRandomAccessOutputStream, isSymlink, ls, mkdir, runProcess, setParent
 
Methods inherited from class com.mucommander.file.AbstractFile
addTrailingSeparator, calculateChecksum, calculateChecksum, calculateChecksum, changePermissions, changePermissions, checkCopyPrerequisites, copyRecursively, copyStream, copyTo, deleteRecursively, deleteRecursively, equals, getAbsolutePath, getAncestor, getAncestor, getCanonicalFile, getCanonicalPath, getCanonicalPath, getChild, getChildSilently, getCopyToHint, getDirectChild, getExtension, getExtension, getIcon, getIcon, getInputStream, getJavaNetURL, getMoveToHint, getNameWithoutExtension, getParentArchive, getParentSilently, getPermissionsString, getRoot, getSeparator, getTopAncestor, getURL, hasAncestor, hasAncestor, hashCode, importPermissions, importPermissions, isBrowsable, isHidden, isParentOf, isRoot, ls, ls, mkdir, mkdirs, mkfile, mkfile, moveTo, removeTrailingSeparator, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CONTROL_PANEL

public static final SpecialWindowsLocation CONTROL_PANEL
Control Panel


MY_COMPUTER

public static final SpecialWindowsLocation MY_COMPUTER
My Computer


MY_DOCUMENTS

public static final SpecialWindowsLocation MY_DOCUMENTS
My Documents


NETWORK_NEIGHBORHOOD

public static final SpecialWindowsLocation NETWORK_NEIGHBORHOOD
Network Neighborhood


RECYCLE_BIN

public static final SpecialWindowsLocation RECYCLE_BIN
Recycle Bin


clsid

protected java.lang.String clsid
A class ID

Constructor Detail

SpecialWindowsLocation

public SpecialWindowsLocation(java.lang.String clsid)
                       throws java.net.MalformedURLException
Creates a new special Windows location using the given CLSID (Class identifier).

Parameters:
clsid - a Windows class identifier
Throws:
java.net.MalformedURLException - should not happen
Method Detail

getName

public java.lang.String getName()
Implementation notes: returns the CLSID (Class identifier) passed to the constructor.

Overrides:
getName in class AbstractFile
Returns:
this file's name

getAbsolutePath

public java.lang.String getAbsolutePath()
Implementation notes: returns the CLSID (Class identifier) passed to the constructor.

Overrides:
getAbsolutePath in class AbstractFile
Returns:
the absolute path to this file

isDirectory

public boolean isDirectory()
Implementation notes: always returns true.

Overrides:
isDirectory in class DummyFile
Returns:
true if this file is a directory, false in any of the cases listed above


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard