Skip to content

Managing loaded files

Francesco Palozzi edited this page Jun 6, 2026 · 1 revision

Managing Loaded Files

IOController maintains an internal list of loaded RNAFile objects and a single recognized format for the current session.


Retrieving the Loaded Files

List<RNAFile> loaded = io.getLoadedRNAFiles();

Returns an unmodifiable copy of the internal list. Modify the list only through the controller's own methods.


Removing a Single File

io.deleteFile(aFile);

Removes the file from the managed list. If the list becomes empty as a result, the recognized format is reset to null.


Fully Resetting the Controller

io.clearAllDataStructures();

Clears the file list and resets the recognized format. Call this before loading a new batch of files in a different format, since the controller enforces a single format per session.


Typical Multi-Session Pattern

IOController io = IOController.getInstance();
 
// First batch — BPSEQ files
io.loadDirectory(Path.of("/data/bpseq/"));
// ... process ...
io.clearAllDataStructures();
 
// Second batch — CT files
io.loadDirectory(Path.of("/data/ct/"));
// ... process ...
io.clearAllDataStructures();

See Also

Clone this wiki locally