[Qt-interest] Symbolic link real value?
Lukas Lipavsky
llipavsky at suse.cz
Tue Jul 28 16:13:17 CEST 2009
On 28.07. 09:50, Tom Panning wrote:
> On Tue, Jul 28, 2009 at 9:14 AM, Pau Garcia i
> Quiles<pgquiles at elpauer.org> wrote:
> > On Tue, Jul 28, 2009 at 2:02 PM, Lukas Lipavsky<llipavsky at suse.cz> wrote:
> >> On 28.07. 13:57, Pau Garcia i Quiles wrote:
> >>> On Tue, Jul 28, 2009 at 1:52 PM, Lukas Lipavsky<llipavsky at suse.cz> wrote:
> >>> > On 28.07. 13:47, Pau Garcia i Quiles wrote:
> >>> >> On Tue, Jul 28, 2009 at 1:40 PM, Lukas Lipavsky<llipavsky at suse.cz> wrote:
> >>> >> > Hi,
> >>> >> >
> >>> >> > is there any way to get the path symlink (in linux) is pointing to? But
> >>> >> > I need the real value - e.g. '../../dir/file'
> >>> >> >
> >>> >> > All I found so far was QFileInfo::symLinkTarget() but it returns
> >>> >> > *absolute* path, which is useless for me.
> >>> >> >
> >>> >> > Is there any way to get this information from the Qt library (better
> >>> >> > than calling ls)?
...
> I think both you and Oliver aren't understanding what Lukas is asking.
> I'm assuming that it's because you're not very familiar with
> Unix-style symbolic links....
yes probably, seems like a misunderstanding to me. Thanks Tom for
pointing it out, I wouldn't realize that this might be a case ;-)
> Lukas, as far as I can tell, Qt won't tell you if the symlink is
> relative or absolute. But maybe someone will prove me wrong,
Thanks, that's what I've been afraid of. I've workarounded it with call
to 'ls -l', but this makes the code quite ugly (about 10 OS-specific lines
instead of one working everywhere)...
Best regards,
--
Lukas Lipavsky, QA Developer
GPG Key ID: FF55774A
Key fingerprint = 5BEB 6AF2 9653 638E EC0E 7E73 9A11 2BC5 FF55 774A
---------------------------------------------------
SUSE LINUX, s.r.o. e-mail: llipavsky at suse.cz
Lihovarska 1060/12 tel: +420 284 028 969
190 00 Prague 9
Czech Republic
---------------------------------------------------
More information about the Qt-interest-old
mailing list