MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / get_long_path

Function get_long_path

windows/utils/winutils.py:490–501  ·  view source on GitHub ↗

Return the long path form for ``path``. :raise: :class:`~windows.winproxy.WinproxyError` if ``path`` does not exists :param path: a valid Windows path :type path: :class:`str` | :obj:`unicode` :returns: :class:`str` | :obj:`unicode` -- same type as ``path`` parameter

(path)

Source from the content-addressed store, hash-verified

488
489
490def get_long_path(path):
491 """Return the long path form for ``path``.
492
493 :raise: :class:`~windows.winproxy.WinproxyError` if ``path`` does not exists
494 :param path: a valid Windows path
495 :type path: :class:`str` | :obj:`unicode`
496 :returns: :class:`str` | :obj:`unicode` -- same type as ``path`` parameter
497 """
498 size = 0x1000
499 buffer = ctypes.create_unicode_buffer(size)
500 rsize = winproxy.GetLongPathNameW(path, buffer, size)
501 return buffer[:rsize]
502
503
504def get_short_path(path):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected