Link to file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everybody,

I'd like to create a link to a file instead of copying the file to the new
destination.
Is there a possibility to do this ? Is there something like a Link Object in
C# .NET ?

I'll be very greatful for an answer asap :-)

Thanks

Heinz
 
The Windows Filesystem doesn't have linked files.

Are you talking about Visual Studio being able to make a link to a source
code file from another project without copying it into the project? Because
Visual Studio *can* do that.

Just in case, and in the interest of time, if that is what you are looking
for...
In VS.NET, right click the project name that you want to add the linked
file, and select Add Existing Item
In the dialog, find the item on disk.
Instead of clicking the Open button, you will notice that there is a little
"drop-down arrow" on the right hand side of the button itself. Click the
Arrow and select "link to file"

Your project will refer to the source file without copying it to the current
project directory.

HTH,
--- Nick
 
Thanks Nick,

but unfortunately this was not what I was looking for.

I am working on large ( up to 1GB) files in my web service and I wanted to
avoid copying these files. Instaed I wanted to create a link to the file and
work on the link afterwards.

Nevertheless thank you for your answer. :-(

Heinz
 
The Windows Filesystem doesn't have linked files.
That isnt true - look up junction points which are similar to hard links in
Unices
 
not the same... not even close.

A linked file in Unix is just that... a file. A junction point in NTFS is a
directory or volume.

A linked file can exist in two different directories. The contents of the
rest of the directory is not affected by the fact that the file is linked.
Not true for a junction point directory, where every file in the directory
exists in two "places".

In Unix, if you delete a linked file from one directory, it still exists in
the other. In NTFS, if you delete a file from a junction point, it's gone.
There was only one "file" in the file system, even though it had two names.

When you create a junction point, it's really a substitution cypher to find
the destination directory or volume given a starting path. Junction points
are useful but not really documented and wildly underused.

In UNIX, you can mount volumes as a directory. Clearly the logic behind
junction points is the same: mount a volume as a sub directory.

However, this is definitely not the same as a linked file.

--- Nick
 
Back
Top