summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f95acfa)
Signed-off-by: Evan Broder <broder@mit.edu>
import _fs
from _fs import whichcell
import _fs
from _fs import whichcell
+
+def inafs(path):
+ """Return True if a path is in AFS."""
+ try:
+ whichcell(path)
+ except OSError, e:
+ if e.errno in (errno.EINVAL, errno.ENOENT):
+ return False
+
+ return True