Re: [SLUG] Virtual Folder

From: Ronan Heffernan (ronanh@auctionsolutions.com)
Date: Wed Jun 23 2004 - 16:53:37 EDT


Dylan William Hardison wrote:

>>done properly, konq shouldn't know the difference
>>between ln -s and a real dir.
>>
>>
>
>Not quite true.
>
>Given the layout:
>
>% tree
>.
>|-- baz -> foo/bar
>|-- foo
>| `-- bar
>`-- test
>
>
>% ls baz/..
>bar/
>
>baz/.. == foo/
>
>So, a symlink to a directory isn't quite the same as a directory.
>
>Shells and file managers have to jump through hoops to make .. appear to
>point to the "right" place.
>
>
>If you really want to link a dir, use this:
> mount --bind olddir newdir
>
>
Actually, no. If I write a C program that calls:
fopen("baz/myfile.txt","r"); then the symlink is followed automatically
(the file foo/bar/myfile.txt is opened). I do not have to resolve the
link target or anything like that. The hierarchy may not be identical,
but as a container for files, the dereferencing is automatic.

--ronan

"There's many the feign enjoyment / from merciless employment. Their
ambition was this deployment / from the minute they left the school." --
Andy Stewart, "Ramblin' Rover"

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:11:31 EDT