boost::filesystem is not detecting symlinks on Linux /sys/devices directory

Hi, I'm writing some code to query the PCI bus for active devices. It should be pretty straightforward, as sysfs maps device information into the linux filesystem in the /sys directory. I simply need to recursively scan this directory until I find the device file corresponding to the devices of interest. I am having trouble with the scanning, using the boost::filesystem library. It seems that the is_symlink function on a path iterator is not correctly detecting a symlink. It correctly determines that the symlink is a directory, but not that it's a symlink. Simply put, I want my recursive code to follow normal directories, but not symlink directories... as it is, there is circular linkage through the /sys directory if I follow symlinks, so the loop goes infinite. Does anyone know how to distinguish between normal directories and symlink directories using boost::filesystem? thanks, conrad
participants (1)
-
Conrad Whelan