links to directories?
- From: "Sudrien" <sudrien fusemail com>
- To: gnome-vfs-list gnome org
- Subject: links to directories?
- Date: Wed, 19 Jan 2005 23:29:49 -0600 (CST)
Ok, I'm working with vfsmm, but this looks like the closes place to go.
Please correct me If I'm wrong.
I have some code that is supposed to get all the directories in a path and
do /somthing/ with that information. It seems to be working fine - except
that I'd also like it to detect links to directories.
Here is the simplest instance:
----------
int Darimasen::submenuCount(Glib::ustring path){
int j=0;
try{
Gnome::Vfs::DirectoryHandle handle;
handle.open(path, Gnome::Vfs::FILE_INFO_DEFAULT );
bool file_exists = true;
while(file_exists){
Glib::RefPtr<Gnome::Vfs::FileInfo> refFileInfo =
handle.read_next(file_exists);
if (refFileInfo->get_type() == Gnome::Vfs::FILE_TYPE_DIRECTORY
&& ( (refFileInfo->get_name().substr(0,1) != ".") || showHidden )
&& refFileInfo->get_name() != "."
&& refFileInfo->get_name() != ".."){
j ;
}
}
}
catch(const Gnome::Vfs::exception& ex){}
return j;
}
----------
So I get a returned value as the number of subdirectories of a given path.
But the symbolic links... how do I check what it points to?
-Sudrien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]