Package org.armedbear.lisp
Class Pathname
java.lang.Object
org.armedbear.lisp.LispObject
org.armedbear.lisp.Pathname
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
LogicalPathname
,URLPathname
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LispObject
protected LispObject
static final char
The path component separator used by internally generated path namestrings.static final Primitive
protected LispObject
protected LispObject
protected LispObject
A string, NIL, :WILD or :UNSPECIFIC.protected LispObject
A positive integer, or NIL, :WILD, :UNSPECIFIC, or :NEWEST. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclassOf()
protected static Pathname
create()
static Pathname
static Pathname
static Pathname
boolean
equal
(LispObject obj) boolean
equalp
(LispObject obj) boolean
final LispObject
protected String
static Pathname
getDirectoryPathname
(File file) getHost()
long
getName()
getParts()
Implementing the getParts() protocol will allow INSPECT to return information about the substructure of a descendent of LispObject.getType()
int
hashCode()
boolean
boolean
isJar()
boolean
static boolean
isSupportedProtocol
(String protocol) boolean
isURL()
static boolean
isValidURL
(String s) boolean
isWild()
static final Pathname
makePathname
(File file) static final Pathname
makePathname
(LispObject args) static final Pathname
mergePathnames
(Pathname pathname, Pathname defaultPathname) static final Pathname
mergePathnames
(Pathname pathname, Pathname defaultPathname, LispObject defaultVersion) static LispObject
Coerces type between descendents of Pathname types by copying structurestatic Pathname
static LispObject
parseNamestring
(AbstractString namestring) static LogicalPathname
parseNamestring
(AbstractString namestring, AbstractString host) setDevice
(LispObject device) setDirectory
(LispObject directory) setHost
(LispObject host) setName
(LispObject name) setType
(LispObject type) setVersion
(LispObject version) int
sxhash()
static LispObject
truename
(LispObject arg) static LispObject
truename
(LispObject arg, boolean errorIfDoesNotExist) static LispObject
static LispObject
typeOf()
typep
(LispObject type) Methods inherited from class org.armedbear.lisp.LispObject
ABS, add, add, aref, AREF, AREF, aref_long, 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, getSlotValue_0, getSlotValue_1, getSlotValue_2, getSlotValue_3, 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, setSlotValue, setSlotValue_0, setSlotValue_1, setSlotValue_2, setSlotValue_3, 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
-
Field Details
-
host
-
device
-
directory
-
name
-
type
A string, NIL, :WILD or :UNSPECIFIC. -
version
A positive integer, or NIL, :WILD, :UNSPECIFIC, or :NEWEST. -
directoryDelimiter
public static final char directoryDelimiterThe path component separator used by internally generated path namestrings.- See Also:
-
GET_INPUT_STREAM
-
-
Constructor Details
-
Pathname
protected Pathname()
-
-
Method Details
-
create
-
create
-
create
-
create
-
getHost
-
setHost
-
getDevice
-
setDevice
-
getDirectory
-
setDirectory
-
getName
-
setName
-
getType
-
setType
-
getVersion
-
setVersion
-
ncoerce
Coerces type between descendents of Pathname types by copying structure -
isSupportedProtocol
-
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 classLispObject
-
typeOf
- Overrides:
typeOf
in classLispObject
-
classOf
- Overrides:
classOf
in classLispObject
-
typep
- Overrides:
typep
in classLispObject
-
getNamestring
-
getDirectoryNamestring
-
equal
- Overrides:
equal
in classLispObject
-
equalp
- Overrides:
equalp
in classLispObject
-
equals
-
hashCode
public int hashCode() -
sxhash
public int sxhash()- Overrides:
sxhash
in classLispObject
-
printObject
- Overrides:
printObject
in classLispObject
-
parseNamestring
-
isValidURL
-
parseNamestring
-
parseNamestring
-
makePathname
-
makePathname
-
isAbsolute
public boolean isAbsolute() -
isJar
public boolean isJar() -
isURL
public boolean isURL() -
isWild
public boolean isWild() -
mergePathnames
-
mergePathnames
public static final Pathname mergePathnames(Pathname pathname, Pathname defaultPathname, LispObject defaultVersion) -
truename
-
truename
-
truename
-
truename
- 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.
-
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.
-
getDirectoryPathname
-
isLocalFile
public boolean isLocalFile()
-