How to handle symbolic link files with Poco?

A general discussion forum.
Posts: 1
Joined: 20 Sep 2012, 04:44

How to handle symbolic link files with Poco?

Postby Wallace » 20 Sep 2012, 04:55

Hi All,

I am new to Poco lib and I am work in Mac OS X. I have a question about the symbolic link files. Does Poco support file operation( copy, move, ... ) for symbolic link files? For example, I want to copy a symbolic link file itself to somewhere, not the file followed by the symbolic link file. How can I do it? Anyone can show me an example? Thanks.


Posts: 89
Joined: 08 Nov 2010, 17:29

Re: How to handle symbolic link files with Poco?

Postby marlowabnp » 30 Sep 2012, 20:38

AFAICT, support for symbolic links is almost non-existent in Poco at the moment. Take a look at File_WIN32.cpp at isLinkImpl and the corresponding UNIX code in File_UNIX.cpp. And that's just to check if a specified pathname is a symbolic link. To do other things with symbolic links is extremely platform-specific, especially on Windoze.

There is insufficient support in the WIN32 API, other than via undocumented/unsupported calls. Also, Windoze itself is only just starting to support them as NTFS junctions. These are a poor subtitute for full UNIX-style symbolic links. See the rant on my blog, ... e-for.html, for more details.

I would like to see support added to Poco for symbolic links, despite these problems. It will be up to one of us Poco users to add it, I reckon. I do have some code that will do the trick, it is a question of Poco-izing it and tidying up lots of loose ends. Also there is the issue of what to do on VMS. I don't know the answer to that one, maybe Guenter or Alex can comment?


Andrew Marlow

Return to “General Discussion”

Who is online

Users browsing this forum: gregee123 and 2 guests