/** * Facilitates sequential access to file. * * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/textstream-object */ export declare class TextStream { static readonly MODE_READ = 1; static readonly MODE_WRITE = 2; static readonly MODE_APPEND = 8; private readonly filename; private readonly unicode; private buffer; private cursor; private mode; constructor(filename: string, unicode: boolean, mode: number); /** * Read-only property that returns True if the file pointer immediately precedes the end-of-line marker in a TextStream file; False if it does not. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/atendofline-property */ get AtEndOfLine(): void; /** * Read-only property that returns True if the file pointer is at the end of a TextStream file; False if it is not. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/atendofstream-property */ get AtEndOfStream(): boolean; /** * Read-only property that returns the column number of the current character position in a TextStream file. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/column-property-visual-basic-for-applications */ get Column(): void; /** * Read-only property that returns the current line number in a TextStream file. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/line-property */ get Line(): void; /** * Closes an open TextStream file. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/close-method-textstream-object */ Close(): void; /** * Reads a specified number of characters from a TextStream file and returns the resulting string. * @param characters Number of characters that you want to read from the file. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/read-method */ Read(characters: number): string | void; /** * Reads an entire TextStream file and returns the resulting string. * @see f */ ReadAll(): string | void; /** * Reads an entire line (up to, but not including, the newline character) from a TextStream file and returns the resulting string. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/readline-method */ ReadLine(): string | void; /** * Skips a specified number of characters when reading a TextStream file. * @param characters Number of characters to skip when reading a file. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/skip-method */ Skip(characters: number): void; /** * Skips the next line when reading a TextStream file. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/skipline-method */ SkipLine(): void; /** * Writes a specified string to a TextStream file. * @param data The text you want to write to the file. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/write-method */ Write(data: string): void; /** * Writes a specified number of newline characters to a TextStream file. * @param lines Number of newline characters you want to write to the file. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/writeblanklines-method */ WriteBlankLines(lines: number): void; /** * Writes a specified string and newline character to a TextStream file. * @param data The text you want to write to the file. If omitted, a newline character is written to the file. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/writeline-method */ WriteLine(data: string): void; setContent(data: string): this; setMode(mode: number): this; private clampCursor; private cursorToEnd; cursorToStart(): this; }