Jwma

dtw.webmail.admin
Class FileStatus

java.lang.Object
  |
  +--dtw.webmail.admin.FileStatus

public class FileStatus
extends java.lang.Object

Class that implements a file status wrapper.

Version:
0.9.7 07/02/2003
Author:
Dieter Wimberger

Field Summary
static int READABLE_DIRECTORY
          Represents an existing and readable directory.
static int READABLE_FILE
          Represents an existing and readable file.
static java.lang.String[] SHOULD_STATE
           
static int WRITEABLE_DIRECTORY
          Represents an existing and writeable directory.
static int WRITEABLE_FILE
          Represents an existing and writeable file.
 
Constructor Summary
FileStatus(java.lang.String filename)
          Constructs a new file status instance.
 
Method Summary
 java.lang.String getFilename()
          Returns the filename of the file that is described through this FileStatus.
 java.lang.String getIsState()
          Returns the IS state of the file described by this FileStatus.
 boolean isDirectory()
          Tests if the file is a directory.
 boolean isExisting()
          Tests if the file exists.
 boolean isReadable()
          Tests if the file is readable.
 boolean isType(int TYPE)
          Tests if the file described by this FileStatus represents the given type.
 boolean isWriteable()
          Tests if the file is writeable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

READABLE_FILE

public static final int READABLE_FILE
Represents an existing and readable file. [Exists,!D,R,!W]

See Also:
Constant Field Values

WRITEABLE_FILE

public static final int WRITEABLE_FILE
Represents an existing and writeable file. [Exists,!D,R,W]

See Also:
Constant Field Values

READABLE_DIRECTORY

public static final int READABLE_DIRECTORY
Represents an existing and readable directory. [Exists,D,R,!W]

See Also:
Constant Field Values

WRITEABLE_DIRECTORY

public static final int WRITEABLE_DIRECTORY
Represents an existing and writeable directory. [Exists,D,R,W]

See Also:
Constant Field Values

SHOULD_STATE

public static final java.lang.String[] SHOULD_STATE
Constructor Detail

FileStatus

public FileStatus(java.lang.String filename)
           throws JwmaException
Constructs a new file status instance.

Method Detail

getFilename

public java.lang.String getFilename()
Returns the filename of the file that is described through this FileStatus.

Returns:
the filename of the file described by this FileStatus.

isWriteable

public boolean isWriteable()
Tests if the file is writeable.

Returns:
true if writeable, false otherwise.

isDirectory

public boolean isDirectory()
Tests if the file is a directory.

Returns:
true if it is a directory, false otherwise.

isReadable

public boolean isReadable()
Tests if the file is readable.

Returns:
true if readable, false otherwise.

isExisting

public boolean isExisting()
Tests if the file exists.

Returns:
true if it exists, false otherwise.

getIsState

public java.lang.String getIsState()
Returns the IS state of the file described by this FileStatus.

Returns:
the is state as String.

isType

public boolean isType(int TYPE)
Tests if the file described by this FileStatus represents the given type.

The types are encoded through given constants.

Returns:
true if of the given type, false otherwise.

Jwma

Copyright © 2000-2003 jwma team (All Rights Reserved.)