<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6">
  <compounddef id="osutils_8cpp" kind="file">
    <compoundname>osutils.cpp</compoundname>
    <includes refid="osutils_8h" local="yes">osutils.h</includes>
    <includes local="no">iostream</includes>
    <includes local="no">sys/types.h</includes>
    <includes local="no">sys/stat.h</includes>
    <includes local="no">fcntl.h</includes>
    <includes local="no">errno.h</includes>
    <incdepgraph>
      <node id="326">
        <label>sys/stat.h</label>
      </node>
      <node id="328">
        <label>errno.h</label>
      </node>
      <node id="327">
        <label>fcntl.h</label>
      </node>
      <node id="325">
        <label>sys/types.h</label>
      </node>
      <node id="324">
        <label>iostream</label>
      </node>
      <node id="323">
        <label>itpp/itbase.h</label>
      </node>
      <node id="322">
        <label>osutils.h</label>
        <link refid="osutils_8h-source"/>
        <childnode refid="323" relation="include">
        </childnode>
      </node>
      <node id="321">
        <label>work/git/mixpp/bdm/osutils.cpp</label>
        <link refid="osutils.cpp"/>
        <childnode refid="322" relation="include">
        </childnode>
        <childnode refid="324" relation="include">
        </childnode>
        <childnode refid="325" relation="include">
        </childnode>
        <childnode refid="326" relation="include">
        </childnode>
        <childnode refid="327" relation="include">
        </childnode>
        <childnode refid="328" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="osutils_8cpp_10f82aae3b9f165f2694d2326d8ecd311" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void get_fname</definition>
        <argsstring>(char *filename, string &amp;dirname, string &amp;f)</argsstring>
        <name>get_fname</name>
        <param>
          <type>char *</type>
          <declname>filename</declname>
        </param>
        <param>
          <type>string &amp;</type>
          <declname>dirname</declname>
        </param>
        <param>
          <type>string &amp;</type>
          <declname>f</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/bdm/osutils.cpp" line="27" bodyfile="/home/smidl/work/git/mixpp/bdm/osutils.cpp" bodystart="27" bodyend="33"/>
      </memberdef>
      <memberdef kind="function" id="osutils_8cpp_1527d5b931624a8b8646477229dd30c82" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void makedir</definition>
        <argsstring>(string &amp;dirname, bool rewrite)</argsstring>
        <name>makedir</name>
        <param>
          <type>string &amp;</type>
          <declname>dirname</declname>
        </param>
        <param>
          <type>bool</type>
          <declname>rewrite</declname>
          <defval>true</defval>
        </param>
        <briefdescription>
<para>Function creates a directory and raises it_error if it is not possible. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>dirname</parametername>
</parameternamelist>
<parameterdescription>
<para>name of the directory to be created </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>rewrite</parametername>
</parameternamelist>
<parameterdescription>
<para>if true then existence of the directory is not an error </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/bdm/osutils.cpp" line="35" bodyfile="/home/smidl/work/git/mixpp/bdm/osutils.cpp" bodystart="35" bodyend="45"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="comment">//<sp/>C++<sp/>Implementation:<sp/>osutils</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Description:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Author:<sp/>smidl<sp/>&lt;smidl@utia.cas.cz&gt;,<sp/>(C)<sp/>2008</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="9"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Copyright:<sp/>See<sp/>COPYING<sp/>file<sp/>that<sp/>comes<sp/>with<sp/>this<sp/>distribution</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="10"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="11"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;osutils.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;iostream&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="normal"></highlight></codeline>
<codeline lineno="16"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>WIN32</highlight></codeline>
<codeline lineno="17"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#include<sp/>&lt;direct.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="18"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight></codeline>
<codeline lineno="19"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#include<sp/>&lt;sys/types.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;sys/stat.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="21"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
<codeline lineno="22"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;fcntl.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;errno.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"></highlight></codeline>
<codeline lineno="26"><highlight class="normal"></highlight></codeline>
<codeline lineno="27"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>get_fname<sp/>(<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>filename,<sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"><sp/>&amp;dirname,<sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"><sp/>&amp;f<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>WIN32</highlight></codeline>
<codeline lineno="29"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sprintf<sp/>(<sp/>filename,</highlight><highlight class="stringliteral">&quot;%s\\%s&quot;</highlight><highlight class="normal">,dirname.c_str(),f.c_str()<sp/>);</highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight></codeline>
<codeline lineno="31"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sprintf<sp/>(<sp/>filename,</highlight><highlight class="stringliteral">&quot;%s/%s&quot;</highlight><highlight class="normal">,dirname.c_str()<sp/>,f.c_str()<sp/>);</highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
<codeline lineno="33"><highlight class="preprocessor"></highlight><highlight class="normal">}</highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>makedir(</highlight><highlight class="keywordtype">string</highlight><highlight class="normal"><sp/>&amp;dirname,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>rewrite){</highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>WIN32</highlight></codeline>
<codeline lineno="37"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(mkdir(dirname.c_str())<sp/>==<sp/>-1)<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Create<sp/>the<sp/>directory</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight></codeline>
<codeline lineno="39"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(mkdir(dirname.c_str(),<sp/>00755)<sp/>==<sp/>-1)<sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Create<sp/>the<sp/>directory</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
<codeline lineno="41"><highlight class="preprocessor"></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((rewrite)<sp/>&amp;&amp;<sp/>(<sp/>errno==EEXIST<sp/>)<sp/>)<sp/>it_warning<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;rewriting<sp/>directory&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>it_error<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;dirfilelog::<sp/>cannot<sp/>create<sp/>directory&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="45"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="/home/smidl/work/git/mixpp/bdm/osutils.cpp"/>
  </compounddef>
</doxygen>
