/
var
/
opt
/
nydus
/
ops
/
customer_local_ops
/
util
/
__pycache__
/
up file
home
� =�j�M � �z � d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZm Z m Z mZ d dlmZ d dl mZ ddlmZ ed� � Z e j$ e� Zd ez Ze eeef Zej2 dk( rWd dlZd dlmZ d d lmZ eZeZeZ eZ!ddejD ejF dddddddfdedededededededede de!dedede$fd�Z%nde$fd�Z%d� Z&d� Z'd � Z(d!� Z) G d"� d#� Z*d$� Z+ G d%� d&� Z, d=d'�Z- d>d(�Z.d?d)�Z/d?d*ed+ed,e$de eeef fd-�Z0 d@d.e eef d+ed,e$d/ee d0ede eeef fd1�Z1 d@d.e eef d+ed,e$d/ee d0ede eeef fd2�Z2 dAd3e eee f d4ed5ed6e$d7ede e$eef fd8�Z3 dAd9ee ee eee f f d5ed6e$d7ede e$eef f d:�Z4d.e eef de eeef fd;�Z5d*ede eeef fd<�Z6y)B� N)�Path)�Any�Tuple�Union�List)�list2cmdline)�fmap� )�ByteSize� )�KiBytes� �win32)�shellcon)�shell�open� file_name�params�verb�show�mask�dir_name�id_list�class_id� class_key�hot_key�monitor�window�returnc �2 � � dt dt ddf� fd�}i � |d|� |d|� |d|� |d | � |d |� |d|� |d|� |d |� |d|� |d|� |d| � |d| � t j di � ��S )a� Wrapper for the Win32 API call ShellExecuteEx. This function can be used on Windows platforms any time Nydus needs to restart itself for any reason because ShellExecuteEx allows the child process to survive after its parent process stops. Initially added to resolve a DLL conflict issue, this could also be useful for upgrading Nydus, for example. Further information for ShellExecuteEx can be found at https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecuteexa :param file_name: The name of the executable to be started. ShellExecuteEx also handles file associations, so this could also be the name of a document, for example, to be opened with the associated application, or a URL to be opened by the user's default browser. :param params: Parameters to be passed to the application. Should not be specified if file_name is NOT an executable file. :param verb: Action to take. May be one of 'edit', 'explore', 'find', 'open', 'print', 'properties' or 'runas'. Defaults to 'open' :param show: Specify how an application is to be shown :param mask: Flags that indicate content and validity of other parameters :param dir_name: Name of the working directory. If None, the current directory is used :param id_list: See Microsoft documentation at the URL above :param class_id: See Microsoft documentation at the URL above :param class_key: See Microsoft documentation at the URL above :param hot_key: See Microsoft documentation at the URL above :param monitor: See Microsoft documentation at the URL above :param window: See Microsoft documentation at the URL above :return: True if the file/application is successfully launched; otherwise, False �key�valr Nc � �� |�|�| <