Plug-in (Function & Smart Service)Free

Text File Utilities

by Appian Corporation

Description

Append, read, or read lines with filters from a text file.

Features

Key Features

Smart Services:

appendTextToFile — Append text to a text Document Functions:

readTextFromFile — Reads data from a text Document (any extension encoded as text) into a string, with an option to preserve line breaks readMatchingLinesInFile — Reads and returns lines from a text Document which contain a provided search string readMatchingLinesInFileRegex — Reads and returns lines from a text Document which match a provided Regex pattern readTextFileByPage — Reads a page of lines from a text Document, returning content and optionally total line count as a dictionary. Supports paged reading of large files to avoid memory issues.

Release notes

Added readTextFileByPage function for paged reading of large text files, avoiding the memory circuit breaker. Returns content as a dictionary with configurable line break preservation and an optional total line count that can be skipped on subsequent pages for better performance.

Version history (6)

3.2.0

  1. New Functions readMatchingLinesInFile & readMatchingLinesInFileRegex
  2. Minor performance improvements to readTextFromFile

3.1.0

  1. Updated deprecated API's.
  2. Append Text to File smart service error fixed.

3.0.2

[Bug Fixes]

  • Fixing issue with readtextfromfile reading from oldest version of document instead of current version

3.0.1

Adding in logging for errors in AppendTextToFile

3.0.0

Updating deprecated ContentService apis

2.0.0

[MIGRATED] Reads data from a text file (any extension, but must be encoded as text) into a string, with an option to preserve linebreaks.

  • v2.0.0 - 12/07/2017

Added smart service to append text to the end of a file

  • v1.0.1 - 10/22/2015

The function now reads from the latest version of the text file instead of the original version Functions: readTextFromFile(Document sourceDocument, Boolean preserveLineBreaks)

Smart Services: Append Text to File (Document sourceDocument, String textToAppend)