Tools FileBrowser/en

Aus expecco Wiki (Version 25.x)
(Weitergeleitet von Tools FileBrowser)
Zur Navigation springen Zur Suche springen

Overview

The File Browser provides useful functions to search, manipulate and edit files. In expecco, its main use is to provide a simple but powerful editor to look at traces, test data attachments or to edit configuration files. The editor supports Unicode and various common encodings and can also display binary data (hex dumps), bitmap images, XML, HTML and some other common file formats.

Notice that this is not meant as a replacement for a powerful specialized text editor. However, it is light weight, starts fast and provides many utilities for day to day tasks.
(actually, its origins go back almost 40 years, long before other systems even had a graphical user interface !).

The tool's documentation is part of the official Smalltalk/X Online Documentation.

This is an expert tool, which should be used with care. Be especially careful to not modify any of expecco's own configuration or support files (which is of course also true for any other text editor).

Display Options

When double clicking on a file, the File Browser will display the file's contents in the lower editor pane. Usually, it will be displayed as text, but if the file contains a bitmap image in one of the common formats (JPEG, TIFF, PNG, GIF, ICO, BMP, etc.) it will display the image in the lower pane.

You can also open a preview window (via "View" - "Preview") which displays a bitmap image file as a thumbnail in a floating window. It immediately follows the current selection without a need for double click (use single click or cursor-movement keys in the file-list).

To get a hex dump of the file's contents, toggle the "Hex Display" toolbar button in the lower toolbar. Sorry, but the hex-dump is (currently) read only. We may add this to a later version if customers are interested (please place a feature request into expecco ALM).

File Indexing (Tags)

For text files in many common formats, the builtin indexer will be able to determine syntactic constructs contained in the file and display them in the index list at the right. Program files written in C, C++, Java, Lisp, Ruby, Smalltalk, and many others, for Makefiles, HTML files etc. are handled. It will determine where functions/chapters/classes etc. start and list them. Click on an item in that list to quickly navigate to the corresponding syntactic entity.

There are also a number of filters (by name pattern or type). For example, it is possible to only list functions, macros, types, labels etc. of a C program file (try the popup menu in the index list for details).

File Search Operations

Press the "File Search" button in the File Browser's toolbar menu, to get an extra page (tab) containing a search input form. You can search for files by name, contents, non-contents, size or modification time. Both file-name and search-pattern can be regular expressions, and the search be either case sensitive or insensitive.

The search is usually recursive. Use this e.g. to find all files with a particular suffix, which contain a particular string pattern or which have been modified before/after some particular time/date. In many situations, this search is faster than using "find | grep" on Unix, and - unless indexed - also faster than corresponding search functions under MS Windows.

Editing Multiple Files

The "Add Text Editor Page" menu function in the main menu's Browser entry adds additional text editor tabs.

Embedded VT100 Terminal Emulator

The File Browser includes a vt100 emulator, in which shell or cmd consoles are shown. The emulation is not 100% perfect, so please be tolerant when some cursor-movements are not accurate or leave garbage characters on the screen (especially cursor movements at the right/bottom may wrap differently than the "real thing"). For real editor work, use xterm under Unix or a cmd window under MS Windows.

SSH Remote Login

Starting with expecco 26.1, remote login and remote file transfer via secure sockets is available both via toolbar buttons and the Tools menu. In addition, keypair generation is provided via the menu.

Advanced File Operations

The File Browser offers a number of special file operations which may be seldom needed, but no less useful to have at your command, when needed.

File Splitting and Joining

File splitting (into a number of smaller files) is useful when you have huge files (typically traces, dumps or debug output) which are too large to be edited in one piece, too large to be stored on a particular storage device (think of the 4Gb size limit of Windows file systems or USB sticks), or which are too large to be sent via mail or other communication channels (think of mail-attachment size limits).

There are two split functions, to split a large file into pieces by size (e.g. pieces of 1Gb) or to split into pieces by line-number count (eg. pieces with 100k lines each).

The functions are found on the File Browser's popup menu (select one or multiple files first) under "Tools" - "File Operations" - "Split".

There are actually two such menu items, "Split by Size" and "Split by #Lines". It will split a file named "x" into parts "x.1", "x.2", etc.

The reverse operation is "Join", which is found under the same submenu. This takes a number of pieces and rejoins them into one big file.

Copying Corrupted Files

This operation may be helpful to extract as much as possible data from partially broken files. I.e. to copy files from an old disk or tape with errors. It will copy the file block wise and skip over bad blocks when an error is encountered (instead of the regular copy operation, which stops when a read error happens). Instead, it will retry to copy the bad data block a few times, and then write a block of zeros to the output and continue to copy (or try to copy) the rest of the file or tape.

Truncate File

This truncates a file to a given size, effectively cutting off the tail of a file.

Erase File

Will write zero bytes over an existing file in order to really clear files with security data (such as cryptographic keys or passwords) as opposed to removal or truncation (which will leave the blocks untouched and only put them onto a freelist unless the OS provides specal mount/disk options. Not all operating systems will actually make the original data unrecoverable (journalling file systems), so this may not be effective, depending on your OS.

File Differences

To generate and display the differences between the two files, select two files in the top file list, then right click and choose "More" → "Compare with each Other".

Alternatively, choose "Tools" → "File Operations" → "File Differences" from the main menu. If only one file is selected, that operation asks for the name of a second file (useful if the other file is found in another directory). If no 2nd file is selected, the file's contents is compared against the text editor's contents.

Directory Differences

The main menu's function "Tools" → "File Operations" → "Directory Differences" will recursively visit two folders and display information about files missing in either directory or being different.

Find Files with Same Contents

Quickly searches a recursive folder hierarchy for files containing the same data. This is very fast and can quickly find duplicates, even among thousands of files.


Back to Online Documentation.
Back to Tools.



Copyright © 2014-2024 eXept Software AG