MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_file_system

Method get_file_system

Lib/test/test_os.py:1048–1059  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

1046 self.assertEqual(cm.exception.filename, filename)
1047
1048 def get_file_system(self, path):
1049 if sys.platform == 'win32':
1050 root = os.path.splitdrive(os.path.abspath(path))[0] + '\\'
1051 import ctypes
1052 kernel32 = ctypes.windll.kernel32
1053 buf = ctypes.create_unicode_buffer("", 100)
1054 ok = kernel32.GetVolumeInformationW(root, None, 0,
1055 None, None, None,
1056 buf, len(buf))
1057 if ok:
1058 return buf.value
1059 # return None if the filesystem is unknown
1060
1061 def test_large_time(self):
1062 # Many filesystems are limited to the year 2038. At least, the test

Callers 1

test_large_timeMethod · 0.95

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected