Sindbad~EG File Manager
�
SԚg�� � �� � d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ d dlmZm Z d dl
mZ d dlm
Z
d dlmZ d dlZn
# e$ r dZY nw xY w e j dZn
# e$ r dZY nw xY w d dlZdZd � Zn
# e$ r dZY nw xY wd
� Zd� Z G d� d
ej � � Z G d� de� � Z G d� de
j ej � � Z G d� de� � Ze dk r ej! � � dS dS )� N)� os_helper)�
TestFailed�
is_emscripten)�FakePath)�test_genericpath)�
TemporaryFileTFc � � t j dd�� � j }t j t j t j g|_ t j |_ || d d� � }|s3t d� t j � � � � � � �t j
|� � } || ||� � }|d |� S )N�kernel32T)�use_last_errorr z&failed to get short path name 0x{:08X})�ctypes�WinDLL�GetShortPathNameW� c_wchar_p�c_uint32�argtypes�restype�OSError�format�get_last_error�create_unicode_buffer)�path�GSPN�
result_len�results �-/usr/local/lib/python3.11/test/test_ntpath.py�_getshortpathnamer "