Mark Korzhov
Mark Korzhov

Reputation: 2159

Is it possible to create symlink to file?

For example, there is a file music.mp3

Is it possible to create symlink for music.mp3 to http://domain.com/file.mp3?

Thanks.

Upvotes: 0

Views: 103

Answers (2)

In principle it is not possible (to have a symlink to some URL)

However, you could have a specialized file system (e.g. using FUSE ..) which would query the web (perhaps using libcurl or some other HTTP library) to get the file and its meta-data. This probably could take you weeks of development (in C). Then you could mount such a filesystem and symlink to it.

Maybe some projects exist which already provide that. Look in httpfs (I don't know much about it).

Upvotes: 2

Randeep
Randeep

Reputation: 543

It is not possible.

symlink from a file to another file is possible. But a file to a url is not possible.

refer, http://en.wikipedia.org/wiki/Symbolic_link

Upvotes: 1

Related Questions