dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: Patch - virtual file structures

Re: Patch - virtual file structures

From: TP Diffenbach <>
Date: Sun, 8 Jun 2003 20:48:45 -0400

I'd been thinking -- nothing more -- of doing something similar, hacking dir_cache
and tree.c to display playlists, as alternate "directory structures".

I think your work is a good start but would be useful if it could read .m3u
playlists, perhaps with additional optional syntax to represent virtual

What I don't like is the binary format; if you're referring to files and
directories as strings, e.g., "/dir/dir/file.mp3", I figure you can't get much
addiional compression or speed with a binary format anyway.

Why do you prefer to seperate the parser out?

I believe that the .m3u specification allows embedding the name of a playlist
within a playlist, which could represent subdirectories; it would additonally be
nice to represent them inline using your syntax or similar.


Quoting Owen Sebastian Hofmann <>:

> Hi. Recently I've been playing around with the rockbox source, and I've
> started working on implementing a sort of virtual directory hierarchy
> within the file browser. The user can create a file which defines an
> arbitrary layout of directories and files, such as this:
> "root" {
> "file one" /directory/file.mp3
> "file two" /directory2/file2.mp3
> "a subdirectory" {
> "another" /foo/bar.mp3
> "another subdir" {
> "whee" /fun.mp3
> }
> }
> "another file" /asdf/asdf.mp3
> }
> This file is then translated into a binary format (I decided to use a
> binary format for speed and code simplicity inside of rockbox itself),
> which, when browsed into with the rockbox file browser, represents that
> layout as if it were an actual directory layout. I've uploaded some
> files to which contain a very
> alpha version of this. These are:
> rockbox-2.0-vfs.diff: a patch to the 2.0 version of rockbox. Changes
> are fairly self-contained, so it probably wouldn't be too hard to make
> it work with cvs versions
> vfsc.c: a very sloppily coded interpreter for the text format mentioned
> above. Written and tested using linux, it should work fine with cygwin.
> I have no idea about windows. This is separate from the rockbox
> source tree.
> vfs.h: file included from both the rockbox patched sources and the
> interpreter.
> So far, this is very preliminary. I've only implemented browsing of the
> .vfs files and playing of directories. No queueing, resume, or checks
> to make sure you don't try to record or alter any files (Altering files
> could muck things up, recording will probably just record to the
> directory containing the .vfs file). The text file must be in exactly
> the format listed above. Quoted label, white space, unquoted file name,
> line break. I'm writing to see if anybody is interested in seeing more
> work on this. I think that this feature, while perhaps not
> extraordinarily useful, is interesting, as it would allow completely
> arbitrary structuring of files, such as by genre, mood, or anything the
> user can think up.

Archos FM has a Rockbox!
Received on 2003-06-09

Page was last modified "Mon Nov 16 10:57:21 2020" The Rockbox Crew -- Privacy Policy