changeset 31593 | ae02cc1f5369 |
parent 31577 | e7a02e9ad162 |
child 31594 | 4a1bf30f5438 |
--- a/mercurial/util.py Mon Mar 20 00:19:33 2017 -0400 +++ b/mercurial/util.py Thu Mar 23 11:58:45 2017 -0700 @@ -1367,6 +1367,13 @@ return ''.join(result) +def getfstype(dirpath): + '''Get the filesystem type name from a directory (best-effort) + + Returns None if we are unsure, or errors like ENOENT, EPERM happen. + ''' + return getattr(osutil, 'getfstype', lambda x: None)(dirpath) + def checknlink(testfile): '''check whether hardlink count reporting works properly'''