ReadTextFile

MacroModule

author

Volker Dicken

package

FMEstable/ReleaseMeVis

definition

ReadTextFile.def

see also

LocalPath

keywords

view, file, ascii, text, comment, help, string, resolve, path

Purpose

Initially implemented to iterate over lists with filenames together with FieldIterator

Might be useful for other tasks

Files are loaded via

codecs.open(fullName, “r”, encoding)

using encoding selected in field encoding

Usage

Just specify a filename and adjust encoding if UTF-8 default is not suitable for the file contents.

Windows

Default Panel

../../../Projects/FileReader/ReadTextFile/Modules/mhelp/Images/Screenshots/ReadTextFile._default.png

Parameter Fields

Field Index

Auto: Bool

AutoClear: Bool

Encoding: Enum

expandedFileName: String

File Content: String

File Name: String

Print Debug Information: Bool

Update: Trigger

Visible Fields

File Name

name: fileName, type: String

File to be read

File Content

name: fileContent, type: String, persistent: no

Read contents

Update

name: update, type: Trigger

Read file

Auto

name: autoUpdate, type: Bool, default: TRUE

Automatically read file on filename change

AutoClear

name: autoClear, type: Bool, default: FALSE

Auto clear on filename change

Encoding

name: encoding, type: Enum, default: utf_8

select suitable encoding

Values:

Title

Name

ASCII

ascii

Latin 1

latin_1

UTF-8

utf_8

UTF-16

utf_16

UTF-32

utf_32

Hidden Fields

expandedFileName

name: expandedFileName, type: String, persistent: no