Thomas Petazzoni wrote:
Done the detection part by looking /proc/bus/usb/devices file.Le Fri, 12 Sep 2008 11:34:39 +0530, ravikumar <ravikumar.vallabhu@xxxxxxxxx> a écrit :I think i may not properly communicated my requirement or people wont understand my requirement. My requirement is simply detect usb storage device plugged into PC and notify any files are transfered(not data transfer, i need file names) .Use D-Bus to get notified by HAL of USB storage devices insertion and removal. It takes a few lines of Python code, or slightly more lines of C code. An example is here [1]. For inotify ,i need to provide the the file/directory to be watched. I wanted to provide usb device mount point as a input inotify, so that it can monitor.Then, to detect the file transfer, use inotify. It also can be used from Python, thanks to [2]. My question is how can i get the mount point. I can get using df command, for that i need device file to which my storage device atatched. Sincerly, Thomas [1] http://friky.svn.sourceforge.net/viewvc/friky/friky2/trunk/friky2/usbkey.py?revision=138&view=markup [2] http://pyinotify.sourceforge.net/ |