This section only concerns the Symbian implementation. This class is supported as described in the JSR-75 specification for Series 40.
The class is supported in Symbian as specified in File API, with the following clarification for the following method:
open(String name, int mode, Boolean timeouts)
Parameter name | Parameter values | Clarification |
---|---|---|
| Boolean | The value of this parameter is not taken into account by the Symbian
implementation: the Symbian implementation always throws |
See also section 'Directory and file access restrictions' under the section Security settings.
An URI which has more than one non-created directories
can be passed to the Connector.open()
method. All directories
in the upper level have to exists when endpoint is created (mkdir()
or create()
operations
is called), however.
void setReadable( boolean readable )
In Symbian this operation does nothing, because the Symbian OS file system does not support a read attribute.
In Series 40, the operation can throw an exception if a file does not exist, the mode is illegal, or the connection is closed.
boolean
canRead()
In Symbian, this operation always returns true because the Symbian OS file system does not support a read attribute.
In Series 40, this operation returns true. It can throw an exception if a file does not exist, the mode is illegal or the connection is closed.
long lastModified()
In Symbian, if you create a new subdirectory, the modified time stamp of the parent directory does not change, because the Symbian OS FAT file system does not change the modified time in this case.
In Series 40, this operation is supported as described in the JSR-75 specification.
java.util.Enumeration
list()
The list()
operation returns
the same list of files and directories regardless of whether a connection
has been established using READ, WRITE, or READ_WRITE modes.
InputStream
and OutputStream
Only one InputStream
and OutputStream
can
be open at the same time for a single FileConnection
.
OutputStream
is
opened with an exclusive mode. This means that other connections cannot share
the same endpoint. InputStream
is opened in the shared
mode if the connection mode is READ.
In Symbian, a new InputStream
has
to be opened to see the changes made by OutputStream
if
the InputStream
has already encountered EOF (end-of-file).
Example 1:
FileConnection fc1 = Connector.open("file:///e:/afile.txt", Connector.READ ); fc1.openInputStream(); FileConnection fc2 = Connector.open("file:///e:/afile.txt", Connector.READ_WRITE); fc2.openInputStream(); // throw an IOException.
Example 2:
FileConnection fc1 = Connector.open("file:///e:/afile.txt", Connector.READ ); fc1.openInputStream(); FileConnection fc2 = Connector.open("file:///e:/afile.txt", Connector.READ); fc2.openInputStream(); // No exception
In
Symbian, FileSystemListener
gets notifications only when
a file system root is added to the device, not when file system roots are
removed.
In Series 40, FileSystemListener
gets
notifications when a file system root is added to the device or removed.
java.util.Enumeration
listRoots()
In Symbian, the method returns both virtual
and physical roots, for example c:/
, e:/
, Internal/
, Memory
card/
. For more information on virtual roots, see Virtual file system.
In Series 40, this operation is supported as described in the JSR-75 specification.