Re: [libvirt] [PATCH 1/7] Add virFileAbsPath() utility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/04/2009 09:28 PM, Amy Griffis wrote:
Add a utility to ensure an absolute path for a potentially realtive path.

Would it make sense for your usage to resolve symbolic links at the same time? If so, you can use the canonicalize-lgpl gnulib module, which portably provides the following function.

/* Return a malloc'd string containing the canonical absolute name of
   the named file.  If any file name component does not exist or is a
   symlink to a nonexistent file, return NULL.  A canonical name does
   not contain any `.', `..' components nor any repeated file name
   separators ('/') or symlinks.  */
char *canonicalize_file_name (const char *);

Paolo

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]