[Ardour-Dev] GTK+ (concepts and advice)

Paul Davis paul at linuxaudiosystems.com
Tue Jun 17 04:52:04 PDT 2008

On Tue, 2008-06-17 at 10:17 +0000, John Emmas wrote:
> ----- Original Message ----- 
> From: "Fons Adriaensen" <fons at kokkinizita.net>
> Subject: Re: [Ardour-Dev] GTK+ (concepts and advice)
> >
> > Not at all the same thing.
> >
> Fons - AFAICT, they are pretty much the same thing (with the proviso the
> Windows only supports hard links for NTFS volumes, not FAT32 etc).
> However, this brings up the question of assessing/determining the partition.
> Given only a path to a file, what calls can a programmer use to determine
> which partition it's located on?  Under Windows it's relatively simple
> because partitons are assigned with a drive letter and from a drive letter
> you can get information about the associated volume.  So even if (unusually)
> a given partition was being referenced by 2 different drive letters, you
> could still work out that they're the same partiton.  I assume that's also
> feasible for Linux but maybe a bit trickier?

ardour actually has code to do this, but in general its a bad idea. as
fons noted, its better to try to do something then check the error if it
fails. the problem is that unlike Windows, where the division of the
filesystem by partition ("drive letter") has been standard from the
start, POSIX-ish systems have always had a unified filesystem which has
had the specific intent of hiding the mapping between physical storage
media and directories/files. this is partly (though only partly) to
encourage application developers to *not* think about the physical
device that backs the filesystem, and instead concentrate on logical
relationships and functional/workflow benefits of doing things one way
versus another. 

More information about the Ardour-Dev mailing list