\hypertarget{struct__Eina__File}{\section{\+\_\+\+Eina\+\_\+\+File Struct Reference}
\label{struct__Eina__File}\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
}


This is the underlying data structure that represents a file in Eina.  


\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
\hyperlink{struct__Eina__File_a587b9634ddf438b909f2a9681a7b3774}{E\+I\+N\+A\+\_\+\+M\+A\+G\+I\+C}
\begin{DoxyCompactList}\small\item\em Indicates whether Eina Magic should be used. \end{DoxyCompactList}\item 
const char $\ast$ \hyperlink{struct__Eina__File_ab2faf024c321a133252a5661591560de}{filename}
\begin{DoxyCompactList}\small\item\em The absolute path of the file. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Hash__Group_ga9a89d7d3ee260d3a60572ebf651b07e0}{Eina\+\_\+\+Hash} $\ast$ \hyperlink{struct__Eina__File_af202d60b864203f478325b0203283692}{map}
\begin{DoxyCompactList}\small\item\em Tracks portions of a file that have been mapped with mmap(2). \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Hash__Group_ga9a89d7d3ee260d3a60572ebf651b07e0}{Eina\+\_\+\+Hash} $\ast$ \hyperlink{struct__Eina__File_aa24e58153abfcb2b0a68364280ed8be6}{rmap}
\begin{DoxyCompactList}\small\item\em Similar function to \hyperlink{struct__Eina__File_af202d60b864203f478325b0203283692}{map}, but used to look up mapped areas by pointer rather than offset/length. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}{global\+\_\+map}
\begin{DoxyCompactList}\small\item\em A pointer to the entire contents of the file that have been mapped with mmap(2). \end{DoxyCompactList}\item 
Eina\+\_\+\+Lock \hyperlink{struct__Eina__File_a27cefdfba152ba3a8e43d708eafb71dd}{lock}
\begin{DoxyCompactList}\small\item\em A file locking mechanism. \end{DoxyCompactList}\item 
unsigned long long \hyperlink{struct__Eina__File_af65d69e588731533125018298cd06503}{length}
\begin{DoxyCompactList}\small\item\em The length of the file in bytes. \end{DoxyCompactList}\item 
time\+\_\+t \hyperlink{struct__Eina__File_a07074435f639f601dc80e908b54ad1d8}{mtime}
\begin{DoxyCompactList}\small\item\em The last modified time. \end{DoxyCompactList}\item 
ino\+\_\+t \hyperlink{struct__Eina__File_a517f56f5a4263127b7db670ba98d4775}{inode}
\begin{DoxyCompactList}\small\item\em The inode. \end{DoxyCompactList}\item 
int \hyperlink{struct__Eina__File_a5db9d54f81084ab96f524270e3247e26}{refcount}
\begin{DoxyCompactList}\small\item\em Keeps track of references to \hyperlink{struct__Eina__File_af202d60b864203f478325b0203283692}{map}. \end{DoxyCompactList}\item 
int \hyperlink{struct__Eina__File_ac3a88ace50ec855e101bdb0f59b94e85}{global\+\_\+refcount}
\begin{DoxyCompactList}\small\item\em Keeps track of references to \hyperlink{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}{global\+\_\+map}. \end{DoxyCompactList}\item 
int \hyperlink{struct__Eina__File_af16ee152235b1e73cecbfbc49046cfe6}{fd}
\begin{DoxyCompactList}\small\item\em The file descriptor. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List} $\ast$ \hyperlink{struct__Eina__File_a0b52b3136c3a63731f86aa72ea53c5dc}{dead\+\_\+map}
\begin{DoxyCompactList}\small\item\em Tracks regions that get a failure from mmap(2). \end{DoxyCompactList}\item 
\hypertarget{struct__Eina__File_af476bdbf75f86d1f5bff7e97174beee5}{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{struct__Eina__File_af476bdbf75f86d1f5bff7e97174beee5}{shared}\+: 1}\label{struct__Eina__File_af476bdbf75f86d1f5bff7e97174beee5}

\begin{DoxyCompactList}\small\item\em Indicates whether this file can be shared. \end{DoxyCompactList}\item 
\hypertarget{struct__Eina__File_a4ce46b533afbd57a2f4fe992bed7d8f4}{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{struct__Eina__File_a4ce46b533afbd57a2f4fe992bed7d8f4}{delete\+\_\+me}\+: 1}\label{struct__Eina__File_a4ce46b533afbd57a2f4fe992bed7d8f4}

\begin{DoxyCompactList}\small\item\em Indicates that this file should be deleted. \end{DoxyCompactList}\item 
\hypertarget{struct__Eina__File_a05c7a2eae472d39736014d4847ad3d03}{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{struct__Eina__File_a05c7a2eae472d39736014d4847ad3d03}{global\+\_\+faulty}\+: 1}\label{struct__Eina__File_a05c7a2eae472d39736014d4847ad3d03}

\begin{DoxyCompactList}\small\item\em Indicates whether \hyperlink{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}{global\+\_\+map} is bad. \end{DoxyCompactList}\item 
\hypertarget{struct__Eina__File_a25b58d041c2b0a61b4816702ca2166b9}{virtual \hyperlink{struct__Eina__File_a25b58d041c2b0a61b4816702ca2166b9}{Eina\+\_\+\+Bool}\+: 1}\label{struct__Eina__File_a25b58d041c2b0a61b4816702ca2166b9}

\begin{DoxyCompactList}\small\item\em Indicates that this is a virtual file. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This is the underlying data structure that represents a file in Eina. 

\subsection{Field Documentation}
\hypertarget{struct__Eina__File_a587b9634ddf438b909f2a9681a7b3774}{\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!E\+I\+N\+A\+\_\+\+M\+A\+G\+I\+C@{E\+I\+N\+A\+\_\+\+M\+A\+G\+I\+C}}
\index{E\+I\+N\+A\+\_\+\+M\+A\+G\+I\+C@{E\+I\+N\+A\+\_\+\+M\+A\+G\+I\+C}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection[{E\+I\+N\+A\+\_\+\+M\+A\+G\+I\+C}]{\setlength{\rightskip}{0pt plus 5cm}\+\_\+\+Eina\+\_\+\+File\+::\+E\+I\+N\+A\+\_\+\+M\+A\+G\+I\+C}}\label{struct__Eina__File_a587b9634ddf438b909f2a9681a7b3774}


Indicates whether Eina Magic should be used. 

\hypertarget{struct__Eina__File_ab2faf024c321a133252a5661591560de}{\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!filename@{filename}}
\index{filename@{filename}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection[{filename}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ \+\_\+\+Eina\+\_\+\+File\+::filename}}\label{struct__Eina__File_ab2faf024c321a133252a5661591560de}


The absolute path of the file. 

Note that the path given when calling \hyperlink{group__Eina__File__Group_ga787592b7325fe0174c324d6a4dbd86da}{eina\+\_\+file\+\_\+open} will be run through \hyperlink{group__Eina__File__Group_ga7596f37d3a8a548f7223c29c55111c83}{eina\+\_\+file\+\_\+path\+\_\+sanitize} before it is stored here. 

Referenced by eina\+\_\+file\+\_\+close(), eina\+\_\+file\+\_\+filename\+\_\+get(), eina\+\_\+file\+\_\+open(), eina\+\_\+file\+\_\+refresh(), and eina\+\_\+file\+\_\+virtualize().

\hypertarget{struct__Eina__File_af202d60b864203f478325b0203283692}{\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!map@{map}}
\index{map@{map}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection[{map}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Hash}$\ast$ \+\_\+\+Eina\+\_\+\+File\+::map}}\label{struct__Eina__File_af202d60b864203f478325b0203283692}


Tracks portions of a file that have been mapped with mmap(2). 

The key is a tuple offset/length and the data is a pointer to the mapped region. 

Referenced by eina\+\_\+file\+\_\+clean\+\_\+close(), eina\+\_\+file\+\_\+common\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+flush(), eina\+\_\+file\+\_\+map\+\_\+new(), eina\+\_\+file\+\_\+open(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+new(), and eina\+\_\+file\+\_\+virtualize().

\hypertarget{struct__Eina__File_aa24e58153abfcb2b0a68364280ed8be6}{\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!rmap@{rmap}}
\index{rmap@{rmap}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection[{rmap}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Hash}$\ast$ \+\_\+\+Eina\+\_\+\+File\+::rmap}}\label{struct__Eina__File_aa24e58153abfcb2b0a68364280ed8be6}


Similar function to \hyperlink{struct__Eina__File_af202d60b864203f478325b0203283692}{map}, but used to look up mapped areas by pointer rather than offset/length. 



Referenced by eina\+\_\+file\+\_\+clean\+\_\+close(), eina\+\_\+file\+\_\+common\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+flush(), eina\+\_\+file\+\_\+map\+\_\+faulted(), eina\+\_\+file\+\_\+map\+\_\+new(), eina\+\_\+file\+\_\+map\+\_\+populate(), eina\+\_\+file\+\_\+open(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+new(), and eina\+\_\+file\+\_\+virtualize().

\hypertarget{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}{\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!global\+\_\+map@{global\+\_\+map}}
\index{global\+\_\+map@{global\+\_\+map}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection[{global\+\_\+map}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ \+\_\+\+Eina\+\_\+\+File\+::global\+\_\+map}}\label{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}


A pointer to the entire contents of the file that have been mapped with mmap(2). 

This is the common case, and E\+F\+L and is optimized for it. 

Referenced by eina\+\_\+file\+\_\+flush(), eina\+\_\+file\+\_\+map\+\_\+all(), eina\+\_\+file\+\_\+map\+\_\+faulted(), eina\+\_\+file\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+open(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+all(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+new(), and eina\+\_\+file\+\_\+virtualize().

\hypertarget{struct__Eina__File_a27cefdfba152ba3a8e43d708eafb71dd}{\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!lock@{lock}}
\index{lock@{lock}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection[{lock}]{\setlength{\rightskip}{0pt plus 5cm}Eina\+\_\+\+Lock \+\_\+\+Eina\+\_\+\+File\+::lock}}\label{struct__Eina__File_a27cefdfba152ba3a8e43d708eafb71dd}


A file locking mechanism. 



Referenced by eina\+\_\+file\+\_\+close(), eina\+\_\+file\+\_\+dup(), eina\+\_\+file\+\_\+flush(), eina\+\_\+file\+\_\+map\+\_\+all(), eina\+\_\+file\+\_\+map\+\_\+faulted(), eina\+\_\+file\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+map\+\_\+lines(), eina\+\_\+file\+\_\+map\+\_\+new(), eina\+\_\+file\+\_\+map\+\_\+populate(), eina\+\_\+file\+\_\+open(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+all(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+new(), and eina\+\_\+file\+\_\+virtualize().

\hypertarget{struct__Eina__File_af65d69e588731533125018298cd06503}{\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!length@{length}}
\index{length@{length}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection[{length}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long long \+\_\+\+Eina\+\_\+\+File\+::length}}\label{struct__Eina__File_af65d69e588731533125018298cd06503}


The length of the file in bytes. 



Referenced by eina\+\_\+file\+\_\+flush(), eina\+\_\+file\+\_\+map\+\_\+all(), eina\+\_\+file\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+map\+\_\+lines(), eina\+\_\+file\+\_\+map\+\_\+new(), eina\+\_\+file\+\_\+open(), eina\+\_\+file\+\_\+refresh(), eina\+\_\+file\+\_\+size\+\_\+get(), and eina\+\_\+file\+\_\+virtualize().

\hypertarget{struct__Eina__File_a07074435f639f601dc80e908b54ad1d8}{\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!mtime@{mtime}}
\index{mtime@{mtime}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection[{mtime}]{\setlength{\rightskip}{0pt plus 5cm}time\+\_\+t \+\_\+\+Eina\+\_\+\+File\+::mtime}}\label{struct__Eina__File_a07074435f639f601dc80e908b54ad1d8}


The last modified time. 



Referenced by eina\+\_\+file\+\_\+mtime\+\_\+get(), eina\+\_\+file\+\_\+open(), eina\+\_\+file\+\_\+refresh(), and eina\+\_\+file\+\_\+virtualize().

\hypertarget{struct__Eina__File_a517f56f5a4263127b7db670ba98d4775}{\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!inode@{inode}}
\index{inode@{inode}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection[{inode}]{\setlength{\rightskip}{0pt plus 5cm}ino\+\_\+t \+\_\+\+Eina\+\_\+\+File\+::inode}}\label{struct__Eina__File_a517f56f5a4263127b7db670ba98d4775}


The inode. 



Referenced by eina\+\_\+file\+\_\+open(), and eina\+\_\+file\+\_\+refresh().

\hypertarget{struct__Eina__File_a5db9d54f81084ab96f524270e3247e26}{\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!refcount@{refcount}}
\index{refcount@{refcount}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection[{refcount}]{\setlength{\rightskip}{0pt plus 5cm}int \+\_\+\+Eina\+\_\+\+File\+::refcount}}\label{struct__Eina__File_a5db9d54f81084ab96f524270e3247e26}


Keeps track of references to \hyperlink{struct__Eina__File_af202d60b864203f478325b0203283692}{map}. 



Referenced by eina\+\_\+file\+\_\+close(), eina\+\_\+file\+\_\+dup(), eina\+\_\+file\+\_\+flush(), eina\+\_\+file\+\_\+map\+\_\+lines(), eina\+\_\+file\+\_\+open(), and eina\+\_\+file\+\_\+virtualize().

\hypertarget{struct__Eina__File_ac3a88ace50ec855e101bdb0f59b94e85}{\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!global\+\_\+refcount@{global\+\_\+refcount}}
\index{global\+\_\+refcount@{global\+\_\+refcount}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection[{global\+\_\+refcount}]{\setlength{\rightskip}{0pt plus 5cm}int \+\_\+\+Eina\+\_\+\+File\+::global\+\_\+refcount}}\label{struct__Eina__File_ac3a88ace50ec855e101bdb0f59b94e85}


Keeps track of references to \hyperlink{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}{global\+\_\+map}. 



Referenced by eina\+\_\+file\+\_\+flush(), eina\+\_\+file\+\_\+map\+\_\+all(), eina\+\_\+file\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+all(), and eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+free().

\hypertarget{struct__Eina__File_af16ee152235b1e73cecbfbc49046cfe6}{\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!fd@{fd}}
\index{fd@{fd}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection[{fd}]{\setlength{\rightskip}{0pt plus 5cm}int \+\_\+\+Eina\+\_\+\+File\+::fd}}\label{struct__Eina__File_af16ee152235b1e73cecbfbc49046cfe6}


The file descriptor. 



Referenced by eina\+\_\+file\+\_\+map\+\_\+all(), eina\+\_\+file\+\_\+map\+\_\+new(), eina\+\_\+file\+\_\+open(), eina\+\_\+file\+\_\+refresh(), eina\+\_\+file\+\_\+virtualize(), eina\+\_\+file\+\_\+xattr\+\_\+get(), and eina\+\_\+file\+\_\+xattr\+\_\+value\+\_\+get().

\hypertarget{struct__Eina__File_a0b52b3136c3a63731f86aa72ea53c5dc}{\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!dead\+\_\+map@{dead\+\_\+map}}
\index{dead\+\_\+map@{dead\+\_\+map}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection[{dead\+\_\+map}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+List}$\ast$ \+\_\+\+Eina\+\_\+\+File\+::dead\+\_\+map}}\label{struct__Eina__File_a0b52b3136c3a63731f86aa72ea53c5dc}


Tracks regions that get a failure from mmap(2). 



Referenced by eina\+\_\+file\+\_\+common\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+flush(), and eina\+\_\+file\+\_\+map\+\_\+faulted().

