Hex Editor - Binary File Editing Software for Windows
Download Hex Editor Neo Hide this button

ISourceFile Interface

This interface represents a source file.

Declaration

interface ISourceFile extends ${IWindow} {
    // Properties
    readonly ${filename}: string;

    // Methods
    ${save}(): void;
    ${saveAs}(newFilename: string): void;
    ${copy}(): void;
    ${paste}(): void;
    ${select}(textSelection: ${ITextSelection}): void;
    ${clearSelection}(): void;
    ${moveCursor}(line: number): void;
    ${moveCursor#moveCursor1}(position: ${ITextPosition}): void;
    ${setText}(text: string): void;
    ${addText}(text: string): void;
    ${insertText}(text: string, pos: ${ITextPosition}): void;
}
// This interface is not available in managed environment
// This interface is not available in native environment

ISourceFile Properties

filename

readonly filename: string;
// This property is not available in managed environment
// This property is not available in native environment

Full path to the source file.

ISourceFile Methods

save

save(): void;
// This method is not available in managed environment
// This method is not available in native environment

Saves changes made to a source file.

saveAs

saveAs(newFilename: string): void;
// This method is not available in managed environment
// This method is not available in native environment
newFilename
Full path to the new file.

Saves the source file to a different file.

copy

copy(): void;
// This method is not available in managed environment
// This method is not available in native environment

Copy the current selection to the Clipboard.

paste

paste(): void;
// This method is not available in managed environment
// This method is not available in native environment

Paste text from the Clipboard.

select

select(textSelection: ${ITextSelection}): void;
// This method is not available in managed environment
// This method is not available in native environment
textSelection
A text range to select.

Select a given range in a source file.

clearSelection

clearSelection(): void;
// This method is not available in managed environment
// This method is not available in native environment

Clears the current selection.

moveCursor

moveCursor(line: number): void;
// This method is not available in managed environment
// This method is not available in native environment
line
Line number.

Move the cursor to the beginning of a given line.

moveCursor

moveCursor(position: ${ITextPosition}): void;
// This method is not available in managed environment
// This method is not available in native environment
position
Text position.

Move the cursor to the given position.

setText

setText(text: string): void;
// This method is not available in managed environment
// This method is not available in native environment
text
The text to set.

Replace the text in a source file.

addText

addText(text: string): void;
// This method is not available in managed environment
// This method is not available in native environment
text
The text to add.

Add text to the end of the source file.

insertText

insertText(text: string, pos: ${ITextPosition}): void;
// This method is not available in managed environment
// This method is not available in native environment
text
The text to set.
pos
Text insertion position.

Insert a text text at position pos.