JCScan is a storage management and data visualization utility program. JCScan analyses the file system of your storage device, gathering informations and computing statistics in order to create visual representations of your digital data. JCScan belongs to a category of utility program usually refered to as disk space manager, disk scanner or disk usage viewer.
Programmed in Java, JCScan is cross-platform by design. Used in combination with your file manager of choice, JCScan can help you efficiently manage large amounts of data and complex directory structures on various types of devices and systems.
JCScan graphical interface allows you to 1. easily browse through a file system, inspecting files and folders and 2. make decisions based on informations not usually available or not directly apparent on lighter file management programs such as directory size, depth, number of files, file size distribution, etc.
Programming JCScan allowed me to achieve several objectives: 1. to learn how to use the Java SE API and GUI related Java libraries (Swing, JavaFx) and put these skills into practice to create something useful, 2. to understand some basic algorithms (sorting, recursive walk, etc.) and, again through pratice, effectively use them to perform computations on real data and 3. demonstrate the skills acquired to potential partners or employers and show my ability to manage an intermediate-level software development project using industry standard technologies.
This program was build using Java 1.8 with some Spring components, obfuscated, compressed and optimized using ProGuard (https://www.guardsquare.com/en/proguard).
The Windows executable was created using Launch4J (http://launch4j.sourceforge.net).
The application icon is free for non-commercial use and can be found at this URL.
This program is released under the following Creative Commons license: CC BY-NC-ND 3.0 (Attribution-Noncommercial-No Derivative Works). The licence full text is available at the following URL: https://creativecommons.org/licenses/by-nc-nd/3.0/legalcode
You can freely use and share the program but it must remain attributed to Jérémie Cheney (https://jeremiecheney.net).
Quick Start
To start analyzing data on a storage device, choose a location in the device file system. This location has the form of a string of characters composed of substrings separated by a special character termed a separator. This separator character is system dependant (a forward slash on Linux, a backward slash on Windows) but JCScan can adapt to all cases.
Examples of locations: 1. on Linux: /home/jeremie/Music, 2. on Windows: C:\Users\jeremie\Music
In order to input the location, you can either: 1. use the location bar below the application menu or 2. use the file chooser which you can reach using the application menu or its dedicated button next to the location bar.
TIP: Most file managers have a location bar allowing you to navigate through directories using a keyboard. Often times, you can aptly switch from using your mouse to using your keyboard in order to change location. In particular, when you need to take note of a location or use a location as an input to another program, you want to: 1. focus the location bar ctrl+l, 2. copy the location ctrl+c, 3. switch to the other application alt+tab, 4. focus the other location bar ctrl+l, 5. paste the location ctrl+v. This works with many applications including JCScan which is meant to be used in combination with other programs.
In order to start the scanning process, either press return when the location bar is focused or click on the scan button.
On starting the scanning process, a dialog window pops up and gives you the possibility to cancel the operation.
Scanning a storage device of large capacity may take time. Important factors impacting the program performance are: file system encryption, storage device technology (SSD are much faster), file system stats caching mechanism, concurrent access, etc. Scanning 50GB contained in 25K files and directories should not take more than 10 seconds on a modern machine.
Usage
Describing entirely how to use JCScan is not really necessary as this application is pretty straightforward to use. The design of its graphical interface conforms to general pratices: all program functionalities are accessible using the application menu and the most important ones have keyboard shortcuts as well as buttons associated to them so to increase the program usability. Besides, many new functionalities are in the pipeline. It is therefore to early to compose an entire user manual. Keep in mind that, as often, there are many ways to do. Choice ultimately belongs to you.
There are however some useful informations which need to be brought to your attention.
Data Integrity
Write operations are not necessary to analyse the data. JCScan does not write on the scanned data storage.
Memory
When you browse through a directory structure, the program uses an internal representation of that structure which was computed during the analysis. The program only scans the directory one time and thus works more rapidly and more efficiently than if it had to scan every directories you access. It however uses a large amount of memory to store collected informations. Memory usage is determined by the complexity of the scanned directory structure (number of elements, subdirectory depths, etc.)
If need be, you can tweak the JVM (Java Virtual Machine) parameters so to use more memory ressources. Initialize: 1. the initial heap size with -Xms, 2. the maximum heap size with -Xmx and 3. the thread stack size with -Xss.
Example: java -Xms1024m -Xmx4096m -Xss1024m -jar /opt/jcscan.jar
Options and parameters
JCScan saves its parameters as well as options chosen by the user in a text file contained either in the installation directory under Windows or in the user home directory under Linux (~/.jcscan/jcscan-0.1.options).
Changing an option takes effect on the next analysis. After changing an option, scan anew the selected location so to update the results or scan a new location.
Interface
The status bar located in the lowest part of the interface presents useful informations on the scanned directory. Informations displayed are 1. on the left, the total numbers of directories, the total number of files and the size of the current directory and 2. on the right, the amount of memory (RAM) used by the program and the time spent scanning the directory.
Keyboard Shortcuts
The scanning results are presented in a set of views: you can select them using the tabs on the left side of the window. Use the function keys (F1, F2, etc.) to quickly switch from one view to another.
Use the F12 function key to access the option panel.
Use the ctrl+l key combination to access the address bar.
Use the alt+s key combination to select another location using a selection box.
Use the alt+r key combination to update the views. Changes made to files and folders, concurrently using another program, do not automatically trigger a rescan.
For browsing, use alt+left and alt+right (or backspace) to get back and forth in the list of previously scanned locations and access their views. Use alt+up and alt+down to go up and down in the directory structure.
Element Attributes
We are using the term element here to refer to either a file or a directory without distinction. JCScan computes a number of element attributes which are not necessary obvious at first and therefore need to be documented.
The level of an element is the level in the file system where the element is located. The level is calculated starting from the root of the file system (level zero).
The depth of an element is the relative level of the deepest subdirectory which can be reached from that element location. To find the level of the deepest subdirectory within a given directory, add this directory level to the considered subdirectory depth.
The size of elements is first acquired, from the file system, in bytes and then converted to kilobytes, megabytes, gigabytes, etc. There are two ways to compute byte quantities represented in higher units. One can either use 1. base 2 units (1KiB = 2^10 bytes = 1024 bytes) or 2. base 10 units (1KB = 10^3 bytes = 1000 bytes). You can select the desired numbering base in the options panel. By default, we use base 2 units on Windows and base 10 units on Linux and MacOS (which uses base 10 units since version 10.6 Snow Leopard).
JCScan resorts to a small set of symbols to represent the types of listed elements: > stands for a directory, . stands for a file and X for an empty directory.
Pie Chart (F1)
The pie chart is a basic graph showing the files and subdirectories contained in the scanned location and representing them with a slice of a pie whose area is proportionate to the element size. The pie chart is very convenient in order to quickly find files and folders occupying a large storage space. Be aware, though, that the pie chart is only showing the biggest elements. If you want a complete and detailed list of all elements, switch to the list view with the F2 key.
Each slice is labeled with informations on the element: name, size in readable format and relative size. Moving your pointer over the label will bring up a small popup window containing more informations: last modification date, type, size in readable format, relative size, number of bytes, depth, number of files, number of directories, name, location, etc.
The pie chart geometry is modifiable. The pie chart diameter can be adjusted as well as the size of the beams connecting the labels to the slices. You may want, for instance, to change the pie chart appearance in the event of long file names not showing completely in the pie chart drawing area. Look for the pie chart tab in the options panel.
List View (F2)
When using this view, keyboard shortcuts becomes really handy. You can quickly browse through the list items using the up and down arrows. The selected item is highlighted. Pressing return while a directory is selected displays its list view. Additional functionalities are available in a context menu which you can access right clicking on an item or using its keyboard shortcut (right hand side menu key) while an item is selected.
When displaying the list, its items are ordered by size. Element attributes can be used to reorder the list and thus make certain facts about the directory more apparent. For example, you can find which directory has the highest depth value.
The list is presented in a table which has a set of header fields containing column titles. Click on these fields on top of the columns to list the items in increasing or decreasing order for a given attribute.
Jérémie Cheney (https://jeremiecheney.net)