def hard_linking_possible():
 scratch_directory = FilePath(tempfile.mkdtemp())
 test_file = scratch_directory.child('src')
 test_file.touch()
 try:
  os.link(test_file.path, scratch_directory.child('dst').path)
  return True
 except:
  return False
 finally:
  scratch_directory.remove()

def hard_linking_possible ( ) : scratch_directory = FilePath ( tempfile . mkdtemp ( ) ) test_file = scratch_directory . child ( 'src' ) test_file . touch ( ) try : os . link ( test_file . path , scratch_directory . child ( 'dst' ) . path ) return True except : return False finally : scratch_directory . remove ( )
return true if hard linking is possible in the current directory .