You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

Stereotype Attributes

DirectoryAlias

AttributeDescriptionAllowed Values / Example
directorySpecify a path to a directory.
This directory will be treated as a base directory. It will be either used directly (for a Filesystem adapter operating directly on directories), or as a base directory for a path segment given by a dynamic file name parameter. It is not possible to jump out of the base directory by ../../aDirectory tricks. The base directory can only be changed in the service settings on the Bridge.

tmp/Export

fileEncodingSpecify the default encoding be used with the directory. This default encoding can be overwritten on adapter calls, using a dynamic encoding parameter, e.g. on Filesystem adapter calls reading lines, or with the Flat File adapter.Refer to Charset Definitions for possible values.
default, when emptyiso-8859-1
Designer defaultutf-8

FileAlias

AttributeDescriptionAllowed Values
fileSpecify name and path of the file you want to access. tmp/Export/ProductExport.txt
encoding
Specify the encoding of the file.Refer to Charset Definitions for possible values.
default, when emptyiso-8859-1
Designer defaultutf-8
resourceThis attribute currently cannot be used in Designer context.

Parameters File Handling

read

NameTypeDirectionDescription
nameStringin

Fully qualified file name of the file you want to read, including the path.

positionIntegerinPosition (in Bytes) from which you want to start reading the file.
lengthIntegerin/outLength (in Bytes) of the snippet of the file you want to read. The actual length of the read data is given back (e.g. on file end).
dataBloboutContent that has been read.

readLine

NameTypeDirectionDescription
nameStringin

Fully qualified file name of the file you want to read, including the path.

encodingStringinEncoding of the file. Default encoding is iso-8859-1.
For a list of possible encodings see Charset Definitions .
lineStringoutFile content of the line that has been read. On file end, line is NULL.
lengthIntegeroutLength (in Bytes) of the line that has been read. On file end, length is 0.

write

NameTypeDirectionDescription
nameStringin

Fully qualified file name of the file you want to write, including the path.

dataBlobinContent you want to write to the file.
lengthIntegerinLength (in Bytes) of the data you want to write, if you want to only write part of the Blob.
positionIntegerinPosition (in Bytes) from which you want to start writing the file.

append

You can use operation append in two modes:

  • append
    If mode is empty or set to append, the content stored in data will be appended to the file specified in name. If the file does not exist, it will be created.
  • overwrite
    If mode is set to overwrite, the file specified in name will be overwritten with the content stored in data. If the file does not exist, it will be created.
    overwrite will only be applied to the first append. All subsequent appends (e.g. in a loop) automatically get mode append.
NameTypeDirectionDescription
nameStringin

Fully qualified file name of the file you want to write, including the path.

dataBlobinContent you want to write to the file.
lengthIntegerinLength (in Bytes) of the data you want to append, if you want to only write part of the Blob.

status

NameTypeDirectionDescription
nameStringin

Fully qualified file name of the file/directory you want to read, including the path.

typeStringoutType of accessed element (File or Directory).
sizeIntegerout

Size of the file in Bytes.

size is meaningless for directories, as it is not the combined size of all contained files and subfolders, but rather some constant defined by the operating system (e.g. 0 or 4096).

accessTimeDateTimeoutTimestamp when the file/directory was accessed for the last time.
creationTimeDateTimeoutTimestamp when the file/directory was created.
modificationTimeDateTimeoutTimestamp when the file/directory was modified for the last time.

rename

NameTypeDirectionDescription
nameStringin

Fully qualified file name of the file you want to rename, including the path.

newNameStringin

New name you want to rename the file to. We recommend to provide a fully qualified file name (including the path).

remove

NameTypeDirectionDescription
nameStringin

Fully qualified file name of the file you want to remove, including the path.

copy

NameTypeDirectionDescription
sourceStringin

Fully qualified file name of the file you want to copy, including the path.

targetStringin

Fully qualified file name of the target file, including the path.

close

NameTypeDirectionDescription
nameStringin

Fully qualified file name of the file you want to close, including the path.

Parameters Directory Handling

readDirectory

NameTypeDirectionDescription
nameStringin

Fully qualified path to the directory you want to read.

entriesArray of StringoutreadDirectory returns an array of String containing the names of the content elements. The array elements do not contain the directory prefix (path).

createDirectory

NameTypeDirectionDescription
nameStringin

Fully qualified file name of the directory you want to create, including the path.

status

NameTypeDirectionDescription
nameStringin

Fully qualified file name of the file/directory you want to read, including the path.

sizeIntegerout

Size of the file in Bytes.

size is meaningless for directories, as it is not the combined size of all contained files and subfolders, but rather some constant defined by the operating system (e.g. 0 or 4096).

typeStringoutType of accessed element (File or Directory).
accessTimeDateTimeoutTimestamp when the file/directory was accessed for the last time.
creationTimeDateTimeoutTimestamp when the file/directory was created.
modificationTimeDateTimeoutTimestamp when the file/directory was modified for the last time.

remove

You can only remove an empty directory with the remove operation. In case the directory contains files or subfolders, use removeRecursively (see below).

NameTypeDirectionDescription
nameStringin

Fully qualified file name of the directory you want to remove, including the path.

removeRecursively

NameTypeDirectionDescription
nameStringin

Fully qualified file name of the top node of the directory tree you want to remove, including the path.

  • No labels