libsaria: Added an is_visible() function

This will return true if the given inode is visible.
This commit is contained in:
Bryan Schumaker 2011-11-13 12:05:03 -05:00
parent 75cb804756
commit fa498f379c
2 changed files with 11 additions and 0 deletions

View File

@ -33,6 +33,7 @@ namespace libsaria
unsigned int size();
void filter(string &text);
bool is_visible(ino_t &);
}
}

View File

@ -167,4 +167,14 @@ namespace libsaria
trigger_callback(REFILTER);
}
bool library::is_visible(ino_t &inode)
{
set<ino_t>::iterator it;
if (filtered == false)
return true;
it = results.find(inode);
return it != results.end();
}
}; /* Namespace: libsaria */