source:
trunk/packages/python-afs/afs/fs.py
@
2723
Last change on this file since 2723 was 2599, checked in by broder, 15 years ago | |
---|---|
File size: 274 bytes |
Line | |
---|---|
1 | import errno |
2 | from afs import _fs |
3 | from afs._fs import whichcell |
4 | |
5 | def inafs(path): |
6 | """Return True if a path is in AFS.""" |
7 | try: |
8 | whichcell(path) |
9 | except OSError, e: |
10 | if e.errno in (errno.EINVAL, errno.ENOENT): |
11 | return False |
12 | |
13 | return True |
Note: See TracBrowser
for help on using the repository browser.