Module modules.scite.filebrowser

Filesystem browser for the scite module. It uses a tree-view like structure with indentation instead of fold markers. There are several option variables used: PLATFORM: OS platform (linux or windows). LS_CMD: The command to list files and directories one line at a time (directories having an appended slash to them). LSD_CMD: The command to list details of files and directories. REDIRECT1: The command line symbol used for redirecting STDOUT to a file. REDIRECT2: The command line symbol used for redirecting STDERR to a file. FILE_OUT: Location of the temporary file that will contain output for various operations. LINE_END: The line end character for the specific PLATFORM. DIR_SEP: The character that separates directories for the specific PLATFORM.

Functions

action () Performs an intelligent file browser action.
close_dir (abs_path, line_num) [Local function] Closes an open directory, hiding its contents.
create () Displays the directory structure.
dir_is_open (line_num) [Local function] Determines if the specified directory is open or not.
get_abs_path (item, line_num) [Local function] Returns the absolute path of the file or directory on the current line.
get_dir_contents (abs_path) [Local function] Returns the contents of a directory.
get_line () [Local function] Returns the text on the current line.
get_sel_or_line () [Local function] Returns the current selection or the text on the current line.
is_dir (item) [Local function] Determines if the item in question is a directory or not.
open_dir (abs_path, line_num) [Local function] Opens a closed directory and displays its contents below in an additional level of indentation.
show_file_details () Retrieves details about a file or directory and displays it in a calltip.


Functions

action ()
Performs an intelligent file browser action. If the item on the current line is a closed directory, it is 'opened', and all of its contents are displayed with an additional level of indentation. If the item is an open directory, it is 'closed', and its contents are hidden. If the item is a file, it is opened in SciTE.
close_dir (abs_path, line_num)
[Local function] Closes an open directory, hiding its contents. All lines with indentation levels higher than the directory's indentation level are removed.

Parameters

  • abs_path: The absolute path of the directory to close.
  • line_num: The line number the directory is on.
create ()
Displays the directory structure. The root directory of the structure displayed is determined by selected text or the contents of the current line. If a directory is specified, it is assumed to be an absolute path. If none is specified, the ROOT directory is displayed.
dir_is_open (line_num)
[Local function] Determines if the specified directory is open or not. Open directories have indented files and directories below the line they are on.

Parameters

  • line_num: The line number of the directory in question.
get_abs_path (item, line_num)
[Local function] Returns the absolute path of the file or directory on the current line. It does this by iterating up lines, noting any changes in indentation. If one is found, that is a directory name and prepends it to the absolute path. It does this until it reaches the root level. At this point this is the absolute path of the file or directory and it is returned.

Parameters

  • item: The name of the file or directory on the current line.
  • line_num: The line number item is on.
get_dir_contents (abs_path)
[Local function] Returns the contents of a directory.

Parameters

  • abs_path: The absolute path of the directory to get the contents of.
get_line ()
[Local function] Returns the text on the current line.
get_sel_or_line ()
[Local function] Returns the current selection or the text on the current line.
is_dir (item)
[Local function] Determines if the item in question is a directory or not. The list commands make sure directories are specified with a DIR_SEP at the end, so this is a simple check.

Parameters

  • item: The name of the file or directory in question.
open_dir (abs_path, line_num)
[Local function] Opens a closed directory and displays its contents below in an additional level of indentation.

Parameters

  • abs_path: The absolute path of the directory to open.
  • line_num: The line number the directory is on.
show_file_details ()
Retrieves details about a file or directory and displays it in a calltip.

Valid XHTML 1.0!