MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / is_mount

Method is_mount

tools/python-3.11.9-amd64/Lib/pathlib.py:1278–1296  ·  view source on GitHub ↗

Check if this path is a POSIX mount point

(self)

Source from the content-addressed store, hash-verified

1276 return False
1277
1278 def is_mount(self):
1279 """
1280 Check if this path is a POSIX mount point
1281 """
1282 # Need to exist and be a dir
1283 if not self.exists() or not self.is_dir():
1284 return False
1285
1286 try:
1287 parent_dev = self.parent.stat().st_dev
1288 except OSError:
1289 return False
1290
1291 dev = self.stat().st_dev
1292 if dev != parent_dev:
1293 return True
1294 ino = self.stat().st_ino
1295 parent_ino = self.parent.stat().st_ino
1296 return ino == parent_ino
1297
1298 def is_symlink(self):
1299 """

Callers

nothing calls this directly

Calls 3

existsMethod · 0.95
is_dirMethod · 0.95
statMethod · 0.95

Tested by

no test coverage detected