Casper: The Tracker-based Removable Media Manager for BeOS

I created the Casper project because I needed a way to organize my growing collection of CD-R/RWs which holds a lot of music and images, but there was no such solution available for my OS of choice, the BeOS.I didn’t have to think hard to come up with an easy-to-implement and easy-to-use solution. I already had the “database”, the Be File system, and I already had the interface, the Tracker, which is the BeOS file manager. The only thing that I needed was an application that would read the file information from the CD’s and store it on the hard drive, then later tell me which CD the files are stored on.

Casper was born.

Ghosts with fancy attributes

I will now give you two examples of how Casper can be used: a photo database and a music database.
The Casper UI is pretty straight-forward. To the left you’ll see a list of available volumes, both removable media and hard disks. And to the right you’ll see a list of storage locations where Casper will store the information.

I start by creating a new storage location. The storage location can either be a folder or a virtual partition(BeFS image). Folders are used for files that should always be searchable, while virtual partitions are used for files which should be easy to separate from the rest of the files on the system.
In this case I’m choosing a folder location for my images.

Casper
When I’m done creating the storage location I get the stack of CDs, containing my photographs, from the shelf and put the first one in my CD-drive to see it appear in the volume list. I select the CD as my source and the newly created storage location as my destination then press the Go! button.

What Casper does now is to create empty versions of all the files on the CD and store them in the specified folder on the hard disk. All the names and attributes of the files and folders remains the same, the only difference is that the files contain no data.
However, in the process Casper added a few extra attributes to the files. Those attributes describes information about the media which the files belong to such as the name of the CD, the path to the file on the CD and a user-defined note about the media(not yet implemented). Additionally Casper also registered its friend application Wendy as the default application for the files.

I repeat the same procedure for every CD in my photo collection. Then I do the same thing with my collection of MP3-CDs with the only exception that I in that specific case will use a virtual volume as the storage location instead of a folder.

Waking the dead

Pointing the Tracker to the folder where I stored my photographs I will now see all my pictures there with thumbnails and everything, since the thumbnails are stored as attributes as well.
Thanks to the fact that each and every file contain information about which media they belong to , I can easily move them around in any way that I desire. I can even move them between partitions and mix them all together. I have the freedom to easily organize them in a better way.

A Query
The files are also searchable right from the Tracker’s Find panel just like any regular file. You’ll be able to search for audio files using attributes such as ‘Artist’ and ‘Album’ and for pictures using ‘Location’ and ‘Colors’ for example. The latter two are my own extensions.

Here’s where the difference between the two storage location types comes in. If I let Casper store the files in a folder on my main partition these files will be considered each time I search that partition. Storing the files on a virtual partition will allow me to search among those files specifically and even leave the partition unmounted and only mount it when I need it.

The Wendy Dialogue
When I double click one of the files it will open up in the preferred application, which as I explained earlier is Casper’s buddy Wendy. Wendy reads the information about the file and displays it in a dialogue. You then either close the window or insert the requested media. If you insert the media, Wendy will launch the file from the media into the default application, or execute it if it’s an executable file. There’s also an option to open the parent folder instead of launching the file.


The return of the zombies

No tool is perfect. Casper has some issues, and here’s a few of them:

1. Drag&Drop won’t work with these files, neither will the “Open File” dialogue in applications. I can think of many possible solutions for this problem for example pipe-like features, translator add-ons or even tracker add-ons. But I won’t go further into them this time, because I need to investigate them more.

2. Casper-generated files can easily be mixed up with regular files if the file size information isn’t visible. I will try to solve this by adding Casper emblems to file icons in a future version.

3. The possibility of moving files around makes it harder to update a rewritable media. I will try to solve this in a later version, but for now updating a media could result in duplicated files.

I welcome any suggestions to issues that a solution like Casper might create. Even though Casper works fine for my personal needs, I want it to be usable to more people.

However, my main point of this article wasn’t to show off my little application, but to show that the underlaying features of the operating system such as the file system might provide aimple solutions to many problems.
Instead of reinventing the wheels at application level, or use alien tools or libs, even a lousy programmer like me was able to quickly create a working solution using the features that the operating system provides.

Here are a few examples of other apps that takes advantage of the BeFS:
IM Kit
Remote Session
BeAndSee
Mail Daemon Replacement

About the author:
I am 25 years old and located in the south of Sweden. I ran a large music community on the web for about six years but had to close it a year ago due to financial reasons. Now that I’m unemployed I spend my time practicing my main interests in life: music, photography, poetry, graphics design, cooking, politics and computers.


If you would like to see your thoughts or experiences with technology published, please consider writing an article for OSNews.

25 Comments

  1. 2004-04-14 9:38 pm
  2. 2004-04-14 9:58 pm
  3. 2004-04-14 10:11 pm
  4. 2004-04-14 10:21 pm
  5. 2004-04-14 10:33 pm
  6. 2004-04-14 11:13 pm
  7. 2004-04-15 12:30 am
  8. 2004-04-15 12:32 am
  9. 2004-04-15 12:46 am
  10. 2004-04-15 12:51 am
  11. 2004-04-15 7:14 am
  12. 2004-04-15 7:55 am
  13. 2004-04-15 12:40 pm
  14. 2004-04-15 12:42 pm
  15. 2004-04-15 12:49 pm
  16. 2004-04-15 5:45 pm
  17. 2004-04-15 7:19 pm
  18. 2004-04-15 8:42 pm
  19. 2004-04-15 9:23 pm
  20. 2004-04-16 12:20 am
  21. 2004-04-16 1:56 am
  22. 2004-04-16 6:10 am
  23. 2004-04-16 2:11 pm
  24. 2004-04-16 3:01 pm
  25. 2004-04-16 5:30 pm