org.armedbear.lisp
Class Pathname
java.lang.Object
org.armedbear.lisp.LispObject
org.armedbear.lisp.Pathname
- Direct Known Subclasses:
- LogicalPathname
public class Pathname
- extends LispObject
Methods inherited from class org.armedbear.lisp.LispObject |
ABS, add, add, aref_long, aref, AREF, AREF, aset, aset, aset, ash, ash, atom, ATOM, caddr, cadr, car, cddr, cdr, CHAR, characterp, CHARACTERP, chars, COMPLEXP, constantp, CONSTANTP, copyToArray, decr, DENOMINATOR, dispatch, divideBy, doubleValue, elt, endp, ENDP, EQ, eql, eql, eql, EQL, equal, EQUAL, equalp, evenp, EVENP, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, floatp, FLOATP, floatValue, getBooleanValue, getCallCount, getDescription, getDocumentation, getFixnumSlotValue, getHotCount, getInstance, getPropertyList, getSlotValue_0, getSlotValue_1, getSlotValue_2, getSlotValue_3, getSlotValue, getSlotValueAsBoolean, getStringChars, getStringValue, getSymbolFunction, getSymbolFunctionOrDie, getSymbolSetfFunction, getSymbolSetfFunctionOrDie, getSymbolValue, incr, incrementCallCount, incrementHotCount, integerp, INTEGERP, intValue, IS_E, IS_GE, IS_GT, IS_LE, IS_LT, IS_NE, isEqualTo, isEqualTo, isGreaterThan, isGreaterThan, isGreaterThanOrEqualTo, isGreaterThanOrEqualTo, isLessThan, isLessThan, isLessThanOrEqualTo, isLessThanOrEqualTo, isNotEqualTo, isNotEqualTo, isSpecialOperator, isSpecialVariable, javaInstance, javaInstance, LDB, length, LENGTH, listp, LISTP, lockableInstance, LOGAND, LOGAND, LOGIOR, LOGIOR, LOGNOT, LOGXOR, LOGXOR, longValue, minusp, MINUSP, MOD, MOD, multiplyBy, multiplyBy, negate, noFillPointer, NOT, nreverse, NTH, NTH, nthcdr, numberp, NUMBERP, NUMERATOR, oddp, ODDP, plusp, PLUSP, princToString, psxhash, psxhash, push, rationalp, RATIONALP, realp, REALP, resolve, reverse, RPLACA, RPLACD, SCHAR, setCallCount, setCar, setCdr, setDocumentation, setHotCount, setPropertyList, setSlotValue_0, setSlotValue_1, setSlotValue_2, setSlotValue_3, setSlotValue, setSlotValue, SIMPLE_STRING_P, SLOT_VALUE, STRING, stringp, STRINGP, subtract, subtract, SVREF, svset, SYMBOLP, truncate, unreadableString, unreadableString, VECTOR_PUSH_EXTEND, VECTOR_PUSH_EXTEND, vectorp, VECTORP, vectorPushExtend, zerop, ZEROP |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
separator
public static final char separator
- The path component separator used by internally generated
path namestrings.
- See Also:
- Constant Field Values
host
protected LispObject host
device
protected LispObject device
directory
protected LispObject directory
name
protected LispObject name
type
protected LispObject type
version
protected LispObject version
LOGICAL_PATHNAME_TRANSLATIONS
public static HashTable LOGICAL_PATHNAME_TRANSLATIONS
Pathname
protected Pathname()
Pathname
protected Pathname(Pathname p)
- Copy constructor which shares no structure with the original.
Pathname
public Pathname(java.lang.String s)
Pathname
public Pathname(java.net.URL url)
invalidateNamestring
public void invalidateNamestring()
- The protocol for changing any instance field (i.e. 'host',
'type', etc.) is to call this method after changing the field
to recompute the namestring. We could do this with
setter/getters, but that choose not to in order to avoid the
performance indirection penalty.
TODO There is no "perfomance penalty" in contemporary
compilers which inline such access, so it would be better to
implement this as setter/getter ME 20110622
Although, given the number of bugs that crop up when this
protocol is not adhered to, maybe we should consider it.
isSupportedProtocol
public static boolean isSupportedProtocol(java.lang.String protocol)
getParts
public LispObject getParts()
- Description copied from class:
LispObject
- Implementing the getParts() protocol will allow INSPECT to
return information about the substructure of a descendent of
LispObject.
The protocol is to return a List of Cons pairs, where the car of
each pair contains a decriptive string, and the cdr returns a
subobject for inspection.
- Overrides:
getParts
in class LispObject
typeOf
public LispObject typeOf()
- Overrides:
typeOf
in class LispObject
classOf
public LispObject classOf()
- Overrides:
classOf
in class LispObject
typep
public LispObject typep(LispObject type)
- Overrides:
typep
in class LispObject
getDevice
public final LispObject getDevice()
getNamestring
public java.lang.String getNamestring()
getDirectoryNamestring
protected java.lang.String getDirectoryNamestring()
asEntryPath
protected java.lang.String asEntryPath()
- Returns:
- The representation of this pathname suitable for
referencing an entry in a Zip/JAR file
equal
public boolean equal(LispObject obj)
- Overrides:
equal
in class LispObject
equalp
public boolean equalp(LispObject obj)
- Overrides:
equalp
in class LispObject
sxhash
public int sxhash()
- Overrides:
sxhash
in class LispObject
printObject
public java.lang.String printObject()
- Overrides:
printObject
in class LispObject
parseNamestring
public static Pathname parseNamestring(java.lang.String s)
isValidURL
public static boolean isValidURL(java.lang.String s)
parseNamestring
public static Pathname parseNamestring(AbstractString namestring)
parseNamestring
public static LogicalPathname parseNamestring(AbstractString namestring,
AbstractString host)
getHostString
protected static java.lang.String getHostString(java.lang.String s)
makePathname
public static final Pathname makePathname(LispObject args)
makePathname
public static final Pathname makePathname(java.io.File file)
isAbsolute
public boolean isAbsolute()
isJar
public boolean isJar()
isURL
public boolean isURL()
isWild
public boolean isWild()
mergePathnames
public static final Pathname mergePathnames(Pathname pathname,
Pathname defaultPathname)
mergePathnames
public static final Pathname mergePathnames(Pathname pathname,
Pathname defaultPathname,
LispObject defaultVersion)
truename
public static final LispObject truename(Pathname pathname)
truename
public static final LispObject truename(LispObject arg)
truename
public static final LispObject truename(LispObject arg,
boolean errorIfDoesNotExist)
truename
public static final LispObject truename(Pathname pathname,
boolean errorIfDoesNotExist)
- Returns:
- The canonical TRUENAME as a Pathname if the pathname
exists, otherwise returns NIL or possibly a subtype of
LispError if there are logical problems with the input.
makeURL
protected static java.net.URL makeURL(Pathname pathname)
getInputStream
public java.io.InputStream getInputStream()
getLastModified
public long getLastModified()
- Returns:
- Time in milliseconds since the UNIX epoch at which the
resource was last modified, or 0 if the time is unknown.
toURL
public java.net.URL toURL()
toFile
public java.io.File toFile()