get command

Use the get command to import a file into the current document at the current cursor position.

 

Syntax

get { prompt [ "fileName" ]
    | [ encoding charEncoding ] "fileName"
    } 

 

Parameters

prompt [ "fileName" ] Use the prompt parameter to indicate that the get file dialog should be displayed to allow the user to select a file.  If the optional fileName parameter is specified, the get file dialog is initialized with the specified file name.
encoding charEncoding Use the optional encoding parameter to specify that the character encoding of the file being imported is charEncoding.  If you specify an empty string (""), the editor tries to detect the file encoding by itself, and defaults to the native encoding if unsuccessful.  If not specified, the imported file is assumed to be in the native (platform default) character encoding.
"fileName" Use the fileName parameter to indicate the file that should be imported.

 

Status

The status parameter will be set to one of the following:

null Indicates that the get command successfully located and loaded the specified file.
file.notFound Indicates that the get command could not locate the specified file.
file.errorReading Indicates that the get command encountered an error while reading the file.

 

Examples

get prompt
get "test.java"
get encoding Cp850 "test.java" 

Related concepts
Editor commands, actions, and parameters

Related reference
get action
Default editor commands