Implemented by
[scriptable, uuid(37ef2e71-edef-46c7-acd9-f0b6e0b15083)]
interface nsIFileSpec : nsISupports
Attributes
readonly attribute
long long
diskSpaceAvailable
attribute
string
fileContents
readonly attribute
unsigned long
fileSize
[noscript]
readonly attribute
nsFileSpec
fileSpec
readonly attribute
nsIInputStream
inputStream
attribute
string
leafName
readonly attribute
unsigned long
modDate
attribute
string
nativePath
readonly attribute
string
NSPRPath
readonly attribute
nsIOutputStream
outputStream
readonly attribute
nsIFileSpec
parent
attribute
string
persistentDescriptorString
attribute
AString
unicodePath
attribute
string
unixStyleFilePath
attribute
string
URLString
Methods
void
appendRelativeUnixPath(in string relativePath)
void
closeStream()
void
copyToDir([const] in nsIFileSpec newParentDir)
void
createDir()
void
delete(in boolean recursive)
void
endLine()
boolean
eof()
boolean
equals(in nsIFileSpec spec)
void
error()
void
execute([const] in string args)
boolean
exists()
boolean
failed()
void
flush()
void
fromFileSpec([const] in nsIFileSpec original)
boolean
isChildOf(in nsIFileSpec possibleParent)
boolean
isDirectory()
boolean
isFile()
boolean
isHidden()
boolean
isStreamOpen()
boolean
isSymlink()
boolean
isValid()
void
makeUnique()
void
makeUniqueDir()
void
makeUniqueDirWithSuggestedName(in string suggestedName)
void
makeUniqueWithSuggestedName(in string suggestedName)
boolean
modDateChanged(in unsigned long oldStamp)
void
moveToDir([const] in nsIFileSpec newParentDir)
void
openStreamForReading()
void
openStreamForReadingAndWriting()
void
openStreamForWriting()
long
read(inout string buffer, in long requestedCount)
void
readLine(inout string line, in long bufferSize, out boolean wasTruncated)
void
rename([const] in string newLeafName)
void
resolveSymlink()
void
seek(in long offset)
[noscript]
void
setFromFileSpec([const] in nsFileSpecRef spec)
long
tell()
void
touch()
void
truncate(in long aNewLength)
Check eof() before each call. CAUTION: false result only indicates line was truncated to fit buffer, or an error occurred (OTHER THAN eof).
long
write(in string data, in long requestedCount)
Compare to: