Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added hidden toc to use in summary page

You can use the Filesystem adapter to write data to a file in the filesystem.

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNameFilesystemAdapter_ProductExport_Example
PageWithExcerptINTERNAL:_designer_examples
shouldDisplayInlineCommentsInIncludesfalse

Writing a File

Using the write operation of the Filesystem adapter, you can write a file to the filesystem.

Multiexcerpt include
MultiExcerptNamewrite
PageWithExcerptFilesystem
shouldDisplayInlineCommentsInIncludesfalse

Replacing the File

Specifying only data and length (optionally), you can write a complete file. If the file is already existing, it will be overwritten with the new content.

Writing Data to a Specified Position in the File

Alternatively, you can use the write operation with the position to write data to a specific position. position defines the byte position within a file to which the new content should be written. Depending on the length of the new data, this will result in a partly update of the file content, and/or an extension of the file.

Related Error Codes

Find a list of all File System Adapter error codes on System Errors of the File System Adapter.

Error CodeDescription
FSASDM/22

Failed creating file.
Either the directory where the file should be written to, is missing, or the filename is too long (Windows limitation).

Appending Data to a File

Using the append operation of the Filesystem adapter, you can append data to a file in the filesystem.

Multiexcerpt include
MultiExcerptNameappend
PageWithExcerptFilesystem
shouldDisplayInlineCommentsInIncludesfalse

Modes

You can use the append operation with two modes:

  • append
    If the mode is empty or append, the content stored in data will be appended to the end of the file specified in name. If the file does not exist, it will be created.
  • overwrite
    If mode is 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. For all subsequent appends (e.g. in a loop), the mode will be switched to append automatically.

Closing a File

Multiexcerpt include
MultiExcerptNamecloseFile
PageWithExcerptReading a File
shouldDisplayInlineCommentsInIncludesfalse


Panel
titleOn this Page:


Multiexcerpt
MultiExcerptNametoc

Table of Contents


Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNameFilesystemAdapter_ProductExport_Example
PageWithExcerptINTERNAL:_designer_examples

Otp
Floatingfalse

MultiexcerpthiddentrueMultiExcerptNametoc

shouldDisplayInlineCommentsInIncludesfalse

Table of ContentsmaxLevel1