Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding all mounted volumes



Greg,

Didn't even see this post before sending my last lengthy reply :) You're
zeroing in on the real nature of the problem. I'll answer some points for
clarification, but I think I'm honing in on the real solution.

> The more I think about it, the more I think this is the problem to solve.
> In short, how do you transform Strings in an arbitrary, even archaic, form
> into live pathnames acceptable to File on the current host? That's a
> different question than finding all mounted volumes.

Right.

> First, I assume those archaic strings don't exist in isolation. Where do
> these strings reside? Can you do a wholesale up-front conversion, or do
> you have to transform the archaic form to a live File-usable form every
> time?
>
> Second, I assume the archaic strings actually refer to something, and it's
> the "somethings" that you're interested in. Where do the "somethings"
> reside? Can the strings be turned into File's (or File-acceptable
> pathnames) without actually referring to the file-system? Are you looking
> for a purely syntactic (textual) transformation, or do you want to then do
> something with a File? How dynamic is the environment in which the archaic
> strings are translated into File-compatible pathnames? For example, if the
> "somethings" on "Foobar CD" aren't available (can't be resolved into an
> existing file), what do you want to happen? How many CD's do you want to
> be able to resolve at once?

Perfect questions :)

There are multiple archaic strings in each legacy file, and unfortunately
I need to allow for the worst case where each instance refers to
completely different disks, most of which would not be mounted. More
typically they would all refer to one CD or mounted volume, and I need to
resolve that one time only while importing the legacy file into the new
database(s).

It is theoretically acceptable but greatly complex to allow the user to OK
locations that are *not* currently accessible, as the actual data these
paths refer to does not *need* to be read during importing. Caveats are
below.

The path portion (between the volume and file names) has significance, as
we're migrating to a packaging scheme similar to Java packages. So the
default package name for imported data will be this path, and then can
logically continue to reside in its original location, as package names
match directory structures (OK completely stolen from Java packages --
it's a good ogranizational scheme).

> It might help to know exactly what you're trying to do. That is, explain
> where the archaic strings come from, what they refer to, where the
> referents come from, and what the lifetime and portability is of the
> converted File-compatible form.

OK nuts and bolts:

Each legacy data file has various sets of data which are being segregated
and put into distinct databases in the newer organizational model. The
only data in the legacy files which is not completely contained in the
legacy files themselves (aside from stuff in the resource fork which we've
agreed to scrap) are sets of video and audio files. These are (horribly)
referred to by Mac Classic (archaic) canonical path names, including the
volume names, and typically these refer to named CDs, since they've
distributed lots of compressed video on CD. This hard-coded referencing
has been no end of trouble for users of the existing application.

My new design stores video, audio, and other dense-stream assets in
packages a la Java packages. There are however some significant
differences form Java packages:

1) Every package directory contains an XML manifest file listing various
data about the actual files belonging to the package. These files might be
local or remain on external, possibly mountable disks. They might referred
by network URLs in future implementations.

2) All other data will no longer refer to actual video/audio/whatever
files, but to the logical package and within the package a logical "scene"
(discreet timeline) and time slice (e.g. 08:32:01 - 08:32:05). Such
decoupling means that a package manifest is used in resolving references
to physical files based on these (and other) attributes.

As I mentioned above, I need to map these archaic but consistently
structured strings to package names, and on importing ideally the actual
files are accessible so that I can write some default version of a package
manifest to an appropriate package directory in the local installation.
Short of that it is possible to simply create a package manifest that
specifies the scenes/timelines but refers to no files, however this would
necessitate future labor-intensive user interaction to map the files back
onto the timelines and some much more robust code to deal with
incorrectly mapped timelines. So this is best avoided as even a user
option.

Hope that is enough explanation -- it's obviously more complex than it
sounds, as most things are :)

Jason
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Finding all mounted volumes (From: Greg Guerin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.