MCPcopy Create free account
hub / github.com/bleachbit/bleachbit / mount_filesystem

Function mount_filesystem

tests/TestWipePath.py:160–168  ·  view source on GitHub ↗

Mount filesystem from either a real device or disk image

(device_or_image, mountpoint)

Source from the content-addressed store, hash-verified

158
159
160def mount_filesystem(device_or_image, mountpoint):
161 """Mount filesystem from either a real device or disk image"""
162 if _is_block_device(device_or_image):
163 option = 'rw,nosuid,nodev,noexec'
164 else:
165 option = 'loop'
166 args = ['mount', '-o', option, device_or_image, mountpoint]
167 run_or_die(args)
168 logger.debug('mounted %s at %s', device_or_image, mountpoint)
169
170
171def unmount_filesystem(mountpoint):

Callers 1

wipe_helperFunction · 0.85

Calls 2

_is_block_deviceFunction · 0.85
run_or_dieFunction · 0.85

Tested by

no test coverage detected