mercurial/util.py
changeset 31593 ae02cc1f5369
parent 31577 e7a02e9ad162
child 31594 4a1bf30f5438
equal deleted inserted replaced
31592:c5d924e5dfdb 31593:ae02cc1f5369
  1364 
  1364 
  1365         result.append(found or part)
  1365         result.append(found or part)
  1366         dir = os.path.join(dir, part)
  1366         dir = os.path.join(dir, part)
  1367 
  1367 
  1368     return ''.join(result)
  1368     return ''.join(result)
       
  1369 
       
  1370 def getfstype(dirpath):
       
  1371     '''Get the filesystem type name from a directory (best-effort)
       
  1372 
       
  1373     Returns None if we are unsure, or errors like ENOENT, EPERM happen.
       
  1374     '''
       
  1375     return getattr(osutil, 'getfstype', lambda x: None)(dirpath)
  1369 
  1376 
  1370 def checknlink(testfile):
  1377 def checknlink(testfile):
  1371     '''check whether hardlink count reporting works properly'''
  1378     '''check whether hardlink count reporting works properly'''
  1372 
  1379 
  1373     # testfile may be open, so we need a separate file for checking to
  1380     # testfile may be open, so we need a separate file for checking to