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

Fons Adriaensen fons at kokkinizita.net
Mon Jun 16 13:01:37 PDT 2008


On Mon, Jun 16, 2008 at 08:19:31PM -0000, John Emmas wrote:

> Interesting....  how complicated is it to use this feature and how much
> faster is it - and why is "copying" in inverted commas??  :-)

In a Unix filesystem a directory is just a list of 

(file-or-directory-name, number).

All information about the file itself is not kept in the
directory but in a separate list of 'inodes' as they are
called, which is indexed by the number. There is one such
list oif inodes for each partition.

This means you can 'copy' a file by just creating a new
entry in a directory - as long as you remain on the same
partition. The file data itself is not copied if you do 
this, there is just a new pointer to the inode created.
The inodes maintain a count of the number of directory
entries pointing to them. A file is deleted - the disk
space it occupies is marked as free - if the count becomes
zero. There is nothing special about the first 'original'
link which in most cases is the only one. Any other is
just as good. 

These are what is called 'hard' links. There are also
'soft' links - these are just a file containing the full
path name of another one, and treated specially by the
system.  Soft links exist in Windows as well (called
'shortcuts' IIRC), but hard links don't.

-- 
FA

Laboratorio di Acustica ed Elettroacustica
Parma, Italia

Lascia la spina, cogli la rosa.




More information about the Ardour-Dev mailing list