Object: File
- Updated2024-09-12
- 1 minute(s) read
(General | Objects) > DataPlugin > Object: File
Object: File
The File object provides information such as the name, origin, and size of the file the DataPlugin is currently processing. You use the File object properties to specify the special format of this file. The file is either a text file or a binary file. Use the methods of the File object to access this file. You can use the methods to read single values, texts, or sections from the file.
The following example reads text from a file. The texts are delimited by a colon within the line. The texts are names and values of Root properties.
Dim PropName, PropValue File.Formatter.LineFeeds = vbNewLine File.Formatter.Delimiters = ":" While (File.Position <> File.Size) PropName = File.GetNextStringValue(eString) PropValue = File.GetNextStringValue(eString) Call Root.Properties.Add(PropName, PropValue) Call File.SkipLine() Wend
Methods
GetBinaryBlock | GetCharacters | GetFixedWidthBlock | GetLineFeed | GetNextBinaryValue | GetNextLine | GetNextStringValue | GetStringBlock | SkipLine | SkipLines | SkipValue | SkipValues