Message6679
Note that this information is not available from standard java.
Jython, because it has posix support, does provide access to the device number, in the st_dev field of the tuple returned from os.stat.
>>> import os
>>> st = os.stat('.')
>>> print st
(16895, 0L, 23L, 1, 0, 0, 0L, 1318677370, 1318677370, 1318677217)
>>> import stat
>>> device_number = st[stat.ST_DEV]
>>> print device_number
23L
However, extracting a major and minor device number from that device number is platform-dependent, AFAIK, meaning that the major and minor device numbers will appear in different bit positions in that device number, on different platforms.
Implementing platform-specific versions of the major and minor functions for each platform has yet been implemented on jython.
Patches welcome. |
|
Date |
User |
Action |
Args |
2011-10-15 11:51:51 | amak | set | messageid: <1318679511.82.0.107771689599.issue1737@psf.upfronthosting.co.za> |
2011-10-15 11:51:51 | amak | set | recipients:
+ amak, irmen, dstromberg |
2011-10-15 11:51:51 | amak | link | issue1737 messages |
2011-10-15 11:51:51 | amak | create | |
|