|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.io.File
|
+--com.dalsemi.fs.DSFile
The TINI implementation of a file. This class has all of the methods defined in java.io.File in addition to methods for executing a file in a seperate process and setting the permissions defined by the TINI filesystem.
| Fields inherited from class java.io.File |
pathSeparator,
pathSeparatorChar,
separator,
separatorChar |
| Constructor Summary | |
DSFile(java.io.File parent,
java.lang.String child)
Creates a new DSFile instance from a parent abstract
pathname and a child pathname string. |
|
DSFile(java.lang.String pathname)
Creates a new DSFile instance by converting the given
pathname string into an abstract pathname. |
|
DSFile(java.lang.String parent,
java.lang.String child)
Creates a new DSFile instance from a parent pathname string
and a child pathname string. |
|
| Method Summary | |
boolean |
canExec()
Determines if the current user has execute permissions for this file. |
int |
executeFile(java.io.InputStream stdin,
java.io.OutputStream stdout,
java.io.OutputStream stderr,
java.lang.String[] args,
boolean foreground,
int ownerID,
java.lang.String processName)
Executes this file. |
int |
executeFile(int ownerID)
Executes this file in the foreground using the default streams for in, out, and err. |
int |
getOtherPermissions()
Gets the permissions for all users other than this file's owner. |
int |
getUserPermissions()
Gets the permissions for this file's owner. |
java.lang.String[] |
list(boolean longls)
If this file represents a directory, this method returns a listing of that directory's contents. |
void |
setOtherPermissions(int perms)
Sets the permissions for all users other than this file's owner. |
void |
setUserPermissions(int perms)
Sets the permissions for this file's owner. |
| Methods inherited from class java.io.File |
canRead,
canWrite,
compareTo,
compareTo,
createNewFile,
createTempFile,
createTempFile,
delete,
deleteOnExit,
equals,
exists,
getAbsoluteFile,
getAbsolutePath,
getCanonicalFile,
getCanonicalPath,
getName,
getParent,
getParentFile,
getPath,
hashCode,
isAbsolute,
isDirectory,
isFile,
isHidden,
lastModified,
length,
list,
list,
listFiles,
listFiles,
listFiles,
listRoots,
mkdir,
mkdirs,
renameTo,
setLastModified,
setReadOnly,
toString,
toURL |
| Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public DSFile(java.lang.String pathname)
DSFile instance by converting the given
pathname string into an abstract pathname. If the given string is
the empty string, then the result is the root directory.pathname - A pathname string
public DSFile(java.lang.String parent,
java.lang.String child)
DSFile instance from a parent pathname string
and a child pathname string.
If parent is null then the new
DSFile instance is created as if by invoking the
single-argument DSFile constructor on the given
child pathname string.
Otherwise the parent pathname string is taken to denote
a directory, and the child pathname string is taken to
denote either a directory or a file. If the child pathname
string is absolute then it is converted into a relative pathname in a
system-dependent way. If parent is the empty string then
the new DSFile instance is created by converting
child into an abstract pathname and resolving the result
against a system-dependent default directory. Otherwise each pathname
string is converted into an abstract pathname and the child abstract
pathname is resolved against the parent.
parent - The parent pathname stringchild - The child pathname string
public DSFile(java.io.File parent,
java.lang.String child)
DSFile instance from a parent abstract
pathname and a child pathname string.
If parent is null then the new
DSFile instance is created as if by invoking the
single-argument DSFile constructor on the given
child pathname string.
Otherwise the parent abstract pathname is taken to
denote a directory, and the child pathname string is taken
to denote either a directory or a file. If the child
pathname string is absolute then it is converted into a relative
pathname in a system-dependent way. If parent is the empty
abstract pathname then the new File instance is created by
converting child into an abstract pathname and resolving
the result against a system-dependent default directory. Otherwise each
pathname string is converted into an abstract pathname and the child
abstract pathname is resolved against the parent.
parent - The parent abstract pathnamechild - The child pathname string| Method Detail |
public int executeFile(int ownerID)
throws java.io.IOException
ownerID - the id of the user executing this file.
public int executeFile(java.io.InputStream stdin,
java.io.OutputStream stdout,
java.io.OutputStream stderr,
java.lang.String[] args,
boolean foreground,
int ownerID,
java.lang.String processName)
throws java.io.IOException
stdin - the input stream used for this process's System.instdout - the output stream used for this process's System.outstderr - the output stream used for this process's System.errargs - the arguments passes to this programforeground - whether this method should block until execution completesownerID - the id of the user executing this fileprocessName - the name to associate with this process
public void setOtherPermissions(int perms)
throws java.io.IOException
0 = ---
1 = --x
2 = -w-
3 = -wx
4 = r--
5 = r-x
6 = rw-
7 = rwx
perms - the new permissions for this file.
public void setUserPermissions(int perms)
throws java.io.IOException
0 = ---
1 = --x
2 = -w-
3 = -wx
4 = r--
5 = r-x
6 = rw-
7 = rwx
perms - the new permissions for this file.
public int getOtherPermissions()
throws java.io.FileNotFoundException
0 = ---
1 = --x
2 = -w-
3 = -wx
4 = r--
5 = r-x
6 = rw-
7 = rwx
perms - the new permissions for this file.
public int getUserPermissions()
throws java.io.FileNotFoundException
0 = ---
1 = --x
2 = -w-
3 = -wx
4 = r--
5 = r-x
6 = rw-
7 = rwx
perms - the new permissions for this file.public boolean canExec()
public java.lang.String[] list(boolean longls)
longls - true for verbose, false for java.io.File style.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||