MultiFilePlayer

reading back multiple files as created by MultiFileWriter with a FilePlayer

Inherits from:: Object : MultiFileReader

This class allows you to read back files that you created with MultiFileWriter. It reads the files back with a (subclass of) FilePlayer, thus allowing to read any data from any line out of any file.

See also: MultiFileWriter, MultiFileReader, and FilePlayer

Creation / Class Methods

*new(fn,fc)
Create a new instance.
fn
The filename, this is either the path to the tarfile, or to the folder containing all files.
fc
The fileClass to use for reading the individual files (default TabFilePlayer). This must be a (subclass of) FilePlayer.

Accessing Instance and Class Variables

readAt(fileid,line)
Read from file with fileid, at line number line
readAtInterpret(fileid,line)
Read from file with fileid, at line number line, and interpret the result (element by element).

Example 1

m = MultiFileWriter.new( "testfile15.txt");

Task({

    3.do{
        m.open;

        20.do{
            m.writeLine( Array.fill( 10, { 1.0.rand }));
            0.25.wait;
        };
        m.close;
        
        1.0.wait;
    };
    "done".postln;
    
}).play;

n = MultiFilePlayer.new( "testfile15.tar");

n.readAt( 2, 4)

n.readAt( 2, 10)

n.readAt( 0, 2)

n.readAt( 1, 4)

n.closeFile;

n.close;

This helpfile was created with the class HelpFile2