This class represents a single file opened by FileSystem.
It provides more information than Window’s input stream
(stream, filename, mime type, anchor).
Note: Any pointer returned by a method of FSFile is valid
only as long as the FSFile object exists. For example a call to GetStream()
doesn’t create the stream but only returns the pointer to it. In
other words after 10 calls to GetStream() you will obtain ten identical
pointers.
FileSystemHandler,
FileSystem,
Overview
Constructor. You probably won’t use it. See Notes for details.
If you are not sure of the meaning of these params, see the description of the GetXXXX()
functions.
It is seldom used by the application programmer but you will need it if
you are writing your own virtual FS. For example you may need something
similar to MemoryInputStream, but because MemoryInputStream
doesn’t free the memory when destroyed and thus passing a memory stream
pointer into FSFile constructor would lead to memory leaks, you
can write your own class derived from FSFile:
Returns anchor (if present). The term of anchor can be easily
explained using few examples:
Usually an anchor is presented only if the MIME type is ‘text/html’.
But it may have some meaning with other files;
for example myanim.avi\#200 may refer to position in animation
or reality.wrl\#MyView may refer to a predefined view in VRML.
Returns full location of the file, including path and protocol.
Examples :
Returns the MIME type of the content of this file. It is either
extension-based (see MimeTypesManager) or extracted from
HTTP protocol Content-Type header.
Returns time when this file was modified.
Returns pointer to the stream. You can use the returned
stream to directly access data. You may suppose
that the stream provide Seek and GetSize functionality
(even in the case of the HTTP protocol which doesn’t provide
this by default. Html uses local cache to work around
this and to speed up the connection).
[This page automatically generated from the Textile source at 2023-06-03 08:07:43 +0000]