/usr/share/pyshared/fs/osfs/watch.py is in python-fs 0.3.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | """
fs.osfs.watch
=============
Change watcher support for OSFS
"""
import os
import sys
import errno
import threading
from fs.errors import *
from fs.path import *
from fs.watch import *
OSFSWatchMixin = None
# Try using native implementation on win32
if sys.platform == "win32":
try:
from fs.osfs.watch_win32 import OSFSWatchMixin
except ImportError:
pass
# Try using pyinotify if available
if OSFSWatchMixin is None:
try:
from fs.osfs.watch_inotify import OSFSWatchMixin
except ImportError:
pass
# Fall back to raising UnsupportedError
if OSFSWatchMixin is None:
class OSFSWatchMixin(object):
def add_watcher(self,*args,**kwds):
raise UnsupportedError
def del_watcher(self,watcher_or_callback):
raise UnsupportedError
|