관리-도구
편집 파일: fake_scandir.cpython-311.pyc
� �܋f;, � �� � d Z ddlZddlZddlmZ ddlmZmZ ej dk rej Z neZ G d� de � � Z G d� d � � Z dd�Zd� Zdd�Z G d� d� � ZdS )z�A fake implementation for the `scandir` function working with FakeFilesystem. Works with both the function integrated into the `os` module since Python 3.5 and the standalone function available in the standalone `scandir` python package. � N)�use_scandir_package)� to_string�make_string_path�� � c �~ � e Zd ZdZd� Zd� Zdd�Zdd�Zd� Zdd�Z e j d k rd � Ze j dk rde fd �ZdS dS )�DirEntryzNEmulates os.DirEntry. Note that we did not enforce keyword only arguments.c � � || _ d| _ d| _ d| _ d| _ d| _ d| _ d| _ d| _ dS )z�Initialize the dir entry with unset values. Args: filesystem: the fake filesystem used for implementation. � NF) �_filesystem�name�path�_abspath�_inode�_islink�_isdir�_statresult�_statresult_symlink��self� filesystems �f/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pyfakefs/fake_scandir.py�__init__zDirEntry.__init__# sL � � &����� ��� ��� �������������#'�� � � � c �J � | j �| � d�� � | j S )z%Return the inode number of the entry.NF)�follow_symlinks)r �stat�r s r �inodezDirEntry.inode3 s&