x\(?a d dl Z d dlZd dlmZ d dlmZ d dlmZ erd dlm Z nd dlmZ eee j f Z G d d ZdS ) N) TYPE_CHECKING)loads)TOMLDocument)StrPath)Unionc > e Zd ZdZdeddfdZdefdZdeddfdZdS ) TOMLFilezI Represents a TOML file. :param path: path to the TOML file pathreturnNc 6 || _ t j | _ d S )N)_pathoslinesep_linesep)selfr s c/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/tomlkit/toml_file.py__init__zTOMLFile.__init__ s c P t | j dd 5 }| }| d }|dk r8| d }||k rd| _ n|dk rd| _ nd| _ t | cddd S # 1 swxY w Y dS ) zGRead the file content as a :class:`tomlkit.toml_document.TOMLDocument`.utf-8 encodingnewline r mixedN)openr readcountr r )r fcontentnum_newlinenum_win_eols r r z TOMLFile.read s $*w ; ; ; "qffhhG "----KQ%mmF33+--$*DMM A%%$(DMM$+DM>> " " " " " " " " " " " " " " " " " "s A6BB"Bdatac @ | }| j dk r| dd }n!| j dk rt j dd| }t | j ddd 5 }| | ddd dS # 1 swxY w Y dS ) z#Write the TOMLDocument to the file.r r z (?