\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 
\mbox{\hyperlink{struct__Eina__File_a587b9634ddf438b909f2a9681a7b3774}{E\+I\+N\+A\+\_\+\+M\+A\+G\+IC}}
\begin{DoxyCompactList}\small\item\em Indicates whether Eina Magic should be used. \end{DoxyCompactList}\item 
const char $\ast$ \mbox{\hyperlink{struct__Eina__File_ab2faf024c321a133252a5661591560de}{filename}}
\begin{DoxyCompactList}\small\item\em The absolute path of the file. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Hash__Group_ga9a89d7d3ee260d3a60572ebf651b07e0}{Eina\+\_\+\+Hash}} $\ast$ \mbox{\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 
\mbox{\hyperlink{group__Eina__Hash__Group_ga9a89d7d3ee260d3a60572ebf651b07e0}{Eina\+\_\+\+Hash}} $\ast$ \mbox{\hyperlink{struct__Eina__File_aa24e58153abfcb2b0a68364280ed8be6}{rmap}}
\begin{DoxyCompactList}\small\item\em Similar function to \mbox{\hyperlink{struct__Eina__File_af202d60b864203f478325b0203283692}{map}}, but used to look up mapped areas by pointer rather than offset/length. \end{DoxyCompactList}\item 
void $\ast$ \mbox{\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 \mbox{\hyperlink{struct__Eina__File_a27cefdfba152ba3a8e43d708eafb71dd}{lock}}
\begin{DoxyCompactList}\small\item\em A file locking mechanism. \end{DoxyCompactList}\item 
unsigned long long \mbox{\hyperlink{struct__Eina__File_af65d69e588731533125018298cd06503}{length}}
\begin{DoxyCompactList}\small\item\em The length of the file in bytes. \end{DoxyCompactList}\item 
time\+\_\+t \mbox{\hyperlink{struct__Eina__File_a07074435f639f601dc80e908b54ad1d8}{mtime}}
\begin{DoxyCompactList}\small\item\em The last modified time. \end{DoxyCompactList}\item 
ino\+\_\+t \mbox{\hyperlink{struct__Eina__File_a517f56f5a4263127b7db670ba98d4775}{inode}}
\begin{DoxyCompactList}\small\item\em The inode. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{struct__Eina__File_a5db9d54f81084ab96f524270e3247e26}{refcount}}
\begin{DoxyCompactList}\small\item\em Keeps track of references to \mbox{\hyperlink{struct__Eina__File_af202d60b864203f478325b0203283692}{map}}. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{struct__Eina__File_ac3a88ace50ec855e101bdb0f59b94e85}{global\+\_\+refcount}}
\begin{DoxyCompactList}\small\item\em Keeps track of references to \mbox{\hyperlink{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}{global\+\_\+map}}. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{struct__Eina__File_af16ee152235b1e73cecbfbc49046cfe6}{fd}}
\begin{DoxyCompactList}\small\item\em The file descriptor. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List}} $\ast$ \mbox{\hyperlink{struct__Eina__File_a0b52b3136c3a63731f86aa72ea53c5dc}{dead\+\_\+map}}
\begin{DoxyCompactList}\small\item\em Tracks regions that get a failure from mmap(2). \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_af476bdbf75f86d1f5bff7e97174beee5}\label{struct__Eina__File_af476bdbf75f86d1f5bff7e97174beee5}} 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{struct__Eina__File_af476bdbf75f86d1f5bff7e97174beee5}{shared}}\+: 1
\begin{DoxyCompactList}\small\item\em Indicates whether this file can be shared. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_a4ce46b533afbd57a2f4fe992bed7d8f4}\label{struct__Eina__File_a4ce46b533afbd57a2f4fe992bed7d8f4}} 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{struct__Eina__File_a4ce46b533afbd57a2f4fe992bed7d8f4}{delete\+\_\+me}}\+: 1
\begin{DoxyCompactList}\small\item\em Indicates that this file should be deleted. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_a05c7a2eae472d39736014d4847ad3d03}\label{struct__Eina__File_a05c7a2eae472d39736014d4847ad3d03}} 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{struct__Eina__File_a05c7a2eae472d39736014d4847ad3d03}{global\+\_\+faulty}}\+: 1
\begin{DoxyCompactList}\small\item\em Indicates whether \mbox{\hyperlink{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}{global\+\_\+map}} is bad. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_a926c715b95fdd5c0a528363d740dd0e9}\label{struct__Eina__File_a926c715b95fdd5c0a528363d740dd0e9}} 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{struct__Eina__File_a926c715b95fdd5c0a528363d740dd0e9}{global\+\_\+hugetlb}}\+: 1
\begin{DoxyCompactList}\small\item\em Indicates whether \mbox{\hyperlink{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}{global\+\_\+map}} uses Huge\+T\+LB. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_a25b58d041c2b0a61b4816702ca2166b9}\label{struct__Eina__File_a25b58d041c2b0a61b4816702ca2166b9}} 
virtual \mbox{\hyperlink{struct__Eina__File_a25b58d041c2b0a61b4816702ca2166b9}{Eina\+\_\+\+Bool}}\+: 1
\begin{DoxyCompactList}\small\item\em Indicates that this is a virtual file. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_a0fa77328e2dda50cd447f617f6dcf111}\label{struct__Eina__File_a0fa77328e2dda50cd447f617f6dcf111}} 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{struct__Eina__File_a0fa77328e2dda50cd447f617f6dcf111}{copied}}\+: 1
\begin{DoxyCompactList}\small\item\em Indicates whether this file has copied data. \end{DoxyCompactList}\end{DoxyCompactItemize}


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

\subsection{Field Documentation}
\mbox{\Hypertarget{struct__Eina__File_a587b9634ddf438b909f2a9681a7b3774}\label{struct__Eina__File_a587b9634ddf438b909f2a9681a7b3774}} 
\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!E\+I\+N\+A\+\_\+\+M\+A\+G\+IC@{E\+I\+N\+A\+\_\+\+M\+A\+G\+IC}}
\index{E\+I\+N\+A\+\_\+\+M\+A\+G\+IC@{E\+I\+N\+A\+\_\+\+M\+A\+G\+IC}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+M\+A\+G\+IC}{EINA\_MAGIC}}
{\footnotesize\ttfamily \+\_\+\+Eina\+\_\+\+File\+::\+E\+I\+N\+A\+\_\+\+M\+A\+G\+IC}



Indicates whether Eina Magic should be used. 

\mbox{\Hypertarget{struct__Eina__File_ab2faf024c321a133252a5661591560de}\label{struct__Eina__File_ab2faf024c321a133252a5661591560de}} 
\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!filename@{filename}}
\index{filename@{filename}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection{\texorpdfstring{filename}{filename}}
{\footnotesize\ttfamily const char$\ast$ \+\_\+\+Eina\+\_\+\+File\+::filename}



The absolute path of the file. 

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

Referenced by eina\+\_\+file\+\_\+clean\+\_\+close(), eina\+\_\+file\+\_\+close(), eina\+\_\+file\+\_\+dup(), and eina\+\_\+file\+\_\+filename\+\_\+get().

\mbox{\Hypertarget{struct__Eina__File_af202d60b864203f478325b0203283692}\label{struct__Eina__File_af202d60b864203f478325b0203283692}} 
\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!map@{map}}
\index{map@{map}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection{\texorpdfstring{map}{map}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Hash__Group_ga9a89d7d3ee260d3a60572ebf651b07e0}{Eina\+\_\+\+Hash}}$\ast$ \+\_\+\+Eina\+\_\+\+File\+::map}



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\+\_\+virtual\+\_\+map\+\_\+free(), and eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+new().

\mbox{\Hypertarget{struct__Eina__File_aa24e58153abfcb2b0a68364280ed8be6}\label{struct__Eina__File_aa24e58153abfcb2b0a68364280ed8be6}} 
\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!rmap@{rmap}}
\index{rmap@{rmap}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection{\texorpdfstring{rmap}{rmap}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Hash__Group_ga9a89d7d3ee260d3a60572ebf651b07e0}{Eina\+\_\+\+Hash}}$\ast$ \+\_\+\+Eina\+\_\+\+File\+::rmap}



Similar function to \mbox{\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\+\_\+virtual\+\_\+map\+\_\+free(), and eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+new().

\mbox{\Hypertarget{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}\label{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}} 
\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!global\+\_\+map@{global\+\_\+map}}
\index{global\+\_\+map@{global\+\_\+map}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection{\texorpdfstring{global\+\_\+map}{global\_map}}
{\footnotesize\ttfamily void$\ast$ \+\_\+\+Eina\+\_\+\+File\+::global\+\_\+map}



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

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

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

\mbox{\Hypertarget{struct__Eina__File_a27cefdfba152ba3a8e43d708eafb71dd}\label{struct__Eina__File_a27cefdfba152ba3a8e43d708eafb71dd}} 
\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!lock@{lock}}
\index{lock@{lock}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection{\texorpdfstring{lock}{lock}}
{\footnotesize\ttfamily Eina\+\_\+\+Lock \+\_\+\+Eina\+\_\+\+File\+::lock}



A file locking mechanism. 



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

\mbox{\Hypertarget{struct__Eina__File_af65d69e588731533125018298cd06503}\label{struct__Eina__File_af65d69e588731533125018298cd06503}} 
\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!length@{length}}
\index{length@{length}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection{\texorpdfstring{length}{length}}
{\footnotesize\ttfamily unsigned long long \+\_\+\+Eina\+\_\+\+File\+::length}



The length of the file in bytes. 



Referenced by eina\+\_\+file\+\_\+dup(), eina\+\_\+file\+\_\+flush(), eina\+\_\+file\+\_\+map\+\_\+lines(), and eina\+\_\+file\+\_\+size\+\_\+get().

\mbox{\Hypertarget{struct__Eina__File_a07074435f639f601dc80e908b54ad1d8}\label{struct__Eina__File_a07074435f639f601dc80e908b54ad1d8}} 
\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!mtime@{mtime}}
\index{mtime@{mtime}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection{\texorpdfstring{mtime}{mtime}}
{\footnotesize\ttfamily time\+\_\+t \+\_\+\+Eina\+\_\+\+File\+::mtime}



The last modified time. 



Referenced by eina\+\_\+file\+\_\+mtime\+\_\+get().

\mbox{\Hypertarget{struct__Eina__File_a517f56f5a4263127b7db670ba98d4775}\label{struct__Eina__File_a517f56f5a4263127b7db670ba98d4775}} 
\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!inode@{inode}}
\index{inode@{inode}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection{\texorpdfstring{inode}{inode}}
{\footnotesize\ttfamily ino\+\_\+t \+\_\+\+Eina\+\_\+\+File\+::inode}



The inode. 

\mbox{\Hypertarget{struct__Eina__File_a5db9d54f81084ab96f524270e3247e26}\label{struct__Eina__File_a5db9d54f81084ab96f524270e3247e26}} 
\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!refcount@{refcount}}
\index{refcount@{refcount}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection{\texorpdfstring{refcount}{refcount}}
{\footnotesize\ttfamily int \+\_\+\+Eina\+\_\+\+File\+::refcount}



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



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

\mbox{\Hypertarget{struct__Eina__File_ac3a88ace50ec855e101bdb0f59b94e85}\label{struct__Eina__File_ac3a88ace50ec855e101bdb0f59b94e85}} 
\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!global\+\_\+refcount@{global\+\_\+refcount}}
\index{global\+\_\+refcount@{global\+\_\+refcount}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection{\texorpdfstring{global\+\_\+refcount}{global\_refcount}}
{\footnotesize\ttfamily int \+\_\+\+Eina\+\_\+\+File\+::global\+\_\+refcount}



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



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

\mbox{\Hypertarget{struct__Eina__File_af16ee152235b1e73cecbfbc49046cfe6}\label{struct__Eina__File_af16ee152235b1e73cecbfbc49046cfe6}} 
\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!fd@{fd}}
\index{fd@{fd}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection{\texorpdfstring{fd}{fd}}
{\footnotesize\ttfamily int \+\_\+\+Eina\+\_\+\+File\+::fd}



The file descriptor. 

\mbox{\Hypertarget{struct__Eina__File_a0b52b3136c3a63731f86aa72ea53c5dc}\label{struct__Eina__File_a0b52b3136c3a63731f86aa72ea53c5dc}} 
\index{\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}!dead\+\_\+map@{dead\+\_\+map}}
\index{dead\+\_\+map@{dead\+\_\+map}!\+\_\+\+Eina\+\_\+\+File@{\+\_\+\+Eina\+\_\+\+File}}
\subsubsection{\texorpdfstring{dead\+\_\+map}{dead\_map}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List}}$\ast$ \+\_\+\+Eina\+\_\+\+File\+::dead\+\_\+map}



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



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

