About FileSets and FileLists

So I'm building a basic block that does the following (summary):
1) shows the list of available filesets to the user
2) displays the list of files (optionally with attributes) in the block for the page view
I'm fine with generating the list of available filesets with this basic code for my "add.php":
    $filesets = FileSet::getMySets($user = false)
<th>Select Fileset: </th><td><select name="fileSetName">
    foreach ($filesets as $fset) {
        $fsn = $fset->getFileSetName();
        echo "<option value='$fsn'>$fsn</option>";
<tr><th>FileSet Header Type: </th><td>

Saves, edits, and views that aspect just fine.

The next bit I'd like to add would look something like this, but I can't find the proper models/methods so far: (some pseudo-code follows)
    $filelist = new FileList();
    if(isset($headerType)&&isset($fileSetName)) {
        $fs = FileSet::getByName($fileSetName);
        // if header size/type is specified
       if($headerType != '') {
            echo "<$headerType>$fileSetName</$headerType>";
        } else {
            echo "<span>---</span>"; 
            //change to whatever for the no-header condition
        echo "<ul>";


View Replies: View Best Answer
Mnkras replied on at Permalink Best Answer Reply
take a look at this:http://pastie.org/1680066
annihilist replied on at Permalink Reply
Thanks for the post!
My error was in that I did not do one critical thing!

$files = $filelist->get();

Once I include this in my code (after $filelist->filterByFileSet($fs)),
I can loop through $files to grab each File object and do as needed!

Thanks a million.