@jc:file Annotation
Specifies the annotations for the File control.
Syntax
@jc:file
[directory-name="directory name"]
[file-mask="file name or file mask"]
[suffix-name="file name suffix"]
[suffix-type="timestamp or index"]
[create-mode="over-write or rename-old"]
[ftp-host-name="ftp host name"]
[ftp-username-name="ftp user name"]
[ftp-password="password"]
[ftp-password-alias="password alias"]
[ftp-local-directory="local directory name"]
Attributes
These attributes determine the default behavior of the File control. The File control can be configured during its lifetime by calling methods of the FileContol class. To learn more about the FileControl class, see the javadoc for the File Control.
directory-name
A directory name is the absolute path name for the directory. In other words, it includes the drive specification as well as the path specification. For example, following are valid directory names:
C:\directory (Windows)
/directory (Unix)
\\servername\sharename\directory (Win32 UNC)
The directory-name attribute is required. Leaving the directory-name attribute unspecified results in an error.
file-mask
The file-mask attribute can specify either a file name or a file mask. If the file-mask contains a wild-card character (such as "*") it will be treated as a file mask. Typically, a wild-card character is specified to get the list of files in a directory. It is illegal to specify a wild-card character for any other operation.
File names are used for read, write and append operations.
suffix-name
This suffix will be used along with a timestamp or incrementing index for creating the file names. The default suffix-name will be "_". For example:
file_01, file_02, file_0809021230123
suffix-type
This option specifies if a timestamp or an incrementing index should be used as a suffix for the file names. The allowed options are: index and timestamp.
create-mode
This option specifies what needs to be done when a write operation is creating a new file and a file with the same name already exists. The allowed options are: over-write and rename-old.
When you use create-mode="rename=old" to rename a file, make sure that you mention the suffix-name and the suffix-type attributes for the new file name. If the suffix attributes are not indicated, then the File control overwrites the old file, instead of renaming it.
ftp-host-name
This option specifies the name of the FTP host, for example, ftp://ftp.bea.com.
ftp-user-name
This option specifies the name of the FTP user.
ftp-password
This option specifies the FTP user's password. If you specify this attribute, you cannot specify the ftp-password-alias attribute.
ftp-password-alias
This option specifies the alias for a user's password. The alias is used to look up a password in a password store. If you specify this attribute, you cannot specify the ftp-password attribute.
ftp-local-directory
This option specifies the directory used for transferring files between the remote file system and the local file system. When reading a remote file, the file is copied from the remote system to the local directory and then read. Similarly, when writing to a remote file system, the file is written to the local directory and then copied to the remote system.
Related Topics
File Control
@jc:file-operation Annotation