�
<��g�; � �� � d dl Z d dlZd dlZd dlZd dlmZ d dlZd dlZd dl Z d dl
mZ d dlm
Z
d dlmZ d dlmZmZ ej d� � Z G d� de� � Zd � Zd
� Z G d� dej � � ZdS )
� N)�AbstractFileSystem)�compr)�get_compression)�
isfilelike�stringify_pathzfsspec.localc � � � e Zd ZdZdZdZdZd%� fd� Zed� � � Z d&d�Z
d%d �Zd
� Zd%d�Z
d� Zd
� Zd� Zd� Zd� Zd'd�Zd'd�Zd� Zd� Zd� Zdefd�Zd� Zd(d�Zd� Zd)d�Zd&d�Zd� Zd � Z e!d!� � � Z"e!d"� � � Z#d#� Z$d$� Z%� xZ&S )*�LocalFileSystema Interface to files on local storage
Parameters
----------
auto_mkdir: bool
Whether, when opening a file, the directory containing it should
be created (if it doesn't already exist). This is assumed by pyarrow
code.
�/)�file�localTFc �H �� t � � j di |�� || _ d S )N� )�super�__init__�
auto_mkdir)�selfr �kwargs� __class__s ��l/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/fsspec/implementations/local.pyr zLocalFileSystem.__init__! s+ �� ������"�"�6�"�"�"�$����� c � � dS )Nr r �r s r �fsidzLocalFileSystem.fsid% s � ��wr c �� � | � |� � }| � |� � rt |� � �|r| � |d�� � d S t j |fi |�� d S �NT��exist_ok)�_strip_protocol�exists�FileExistsError�makedirs�os�mkdir)r �path�create_parentsr s r r# zLocalFileSystem.mkdir) sy � ��#�#�D�)�)���;�;�t��� (�!�$�'�'�'�� %��M�M�$��M�.�.�.�.�.��H�T�$�$�V�$�$�$�$�$r c �\ � | � |� � }t j ||�� � d S )Nr )r r"