o
    Q `                     @   s   d Z ddlZddlmZ ddlmZ ddlmZ ejr#ddlm	Z	m
Z
 g dZG d	d
 d
eZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZdS )zManage filesystems in platform-specific application directories.

These classes abstract away the different requirements for user data
across platforms, which vary in their conventions. They are all
subclasses of `~fs.osfs.OSFS`.

    N   )OSFS)	make_repr)AppDirs)OptionalText)
UserDataFSUserConfigFS
SiteDataFSSiteConfigFSUserCacheFS	UserLogFSc                       s>   e Zd ZdZdZ				d fdd	Zdd Zd	d
 Z  ZS )_AppFSz'Abstract base class for an app FS.
    NFTc                    s8   t ||||| _|| _tt| jt| j| j|d d S )N)create)r   app_dirs_createsuperr   __init__getattrapp_dir)selfappnameauthorversionroamingr   	__class__ */usr/lib/python3/dist-packages/fs/appfs.pyr   )   s
   	

z_AppFS.__init__c                 C   s:   t | jj| jj| jjd f| jjd f| jjdf| jdfdS )NFT)r   r   r   r   )	r   r   __name__r   r   Z	appauthorr   r   r   r   r   r   r   __repr__8   s   


z_AppFS.__repr__c                 C   s   d | jj | jjS )Nz	<{} '{}'>)formatr   r   lowerr   r   r    r   r   r   __str__C   s   z_AppFS.__str__)NNFT)	r   
__module____qualname____doc__r   r   r!   r$   __classcell__r   r   r   r   r       s    r   c                   @      e Zd ZdZdZdS )r   aG  A filesystem for per-user application data.

    May also be opened with
    ``open_fs('userdata://appname:author:version')``.

    Arguments:
        appname (str): The name of the application.
        author (str): The name of the author (used on Windows).
        version (str): Optional version string, if a unique location
            per version of the application is required.
        roaming (bool): If `True`, use a *roaming* profile on
            Windows.
        create (bool): If `True` (the default) the directory
            will be created if it does not exist.

    Zuser_data_dirNr   r%   r&   r'   r   r   r   r   r   r   J       r   c                   @   r)   )r	   aB  A filesystem for per-user config data.

    May also be opened with
    ``open_fs('userconf://appname:author:version')``.

    Arguments:
        appname (str): The name of the application.
        author (str): The name of the author (used on Windows).
        version (str): Optional version string, if a unique location
            per version of the application is required.
        roaming (bool): If `True`, use a *roaming* profile on
            Windows.
        create (bool): If `True` (the default) the directory
            will be created if it does not exist.

    Zuser_config_dirNr*   r   r   r   r   r	   _   r+   r	   c                   @   r)   )r   aN  A filesystem for per-user application cache data.

    May also be opened with
    ``open_fs('usercache://appname:author:version')``.

    Arguments:
        appname (str): The name of the application.
        author (str): The name of the author (used on Windows).
        version (str): Optional version string, if a unique location
            per version of the application is required.
        roaming (bool): If `True`, use a *roaming* profile on
            Windows.
        create (bool): If `True` (the default) the directory
            will be created if it does not exist.

    Zuser_cache_dirNr*   r   r   r   r   r   t   r+   r   c                   @   r)   )r
   aC  A filesystem for application site data.

    May also be opened with
    ``open_fs('sitedata://appname:author:version')``.

    Arguments:
        appname (str): The name of the application.
        author (str): The name of the author (used on Windows).
        version (str): Optional version string, if a unique location
            per version of the application is required.
        roaming (bool): If `True`, use a *roaming* profile on
            Windows.
        create (bool): If `True` (the default) the directory
            will be created if it does not exist.

    Zsite_data_dirNr*   r   r   r   r   r
      r+   r
   c                   @   r)   )r   aE  A filesystem for application config data.

    May also be opened with
    ``open_fs('siteconf://appname:author:version')``.

    Arguments:
        appname (str): The name of the application.
        author (str): The name of the author (used on Windows).
        version (str): Optional version string, if a unique location
            per version of the application is required.
        roaming (bool): If `True`, use a *roaming* profile on
            Windows.
        create (bool): If `True` (the default) the directory
            will be created if it does not exist.

    Zsite_config_dirNr*   r   r   r   r   r      r+   r   c                   @   r)   )r   aJ  A filesystem for per-user application log data.

    May also be opened with
    ``open_fs('userlog://appname:author:version')``.

    Arguments:
        appname (str): The name of the application.
        author (str): The name of the author (used on Windows).
        version (str): Optional version string, if a unique location
            per version of the application is required.
        roaming (bool): If `True`, use a *roaming* profile on
            Windows.
        create (bool): If `True` (the default) the directory
            will be created if it does not exist.

    Zuser_log_dirNr*   r   r   r   r   r      r+   r   )r'   typingZosfsr   Z_reprr   Zappdirsr   ZTYPE_CHECKINGr   r   __all__r   r   r	   r   r
   r   r   r   r   r   r   <module>   s    
*