<?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.8.16">
  <compounddef id="vfs_8cpp" kind="file" language="C++">
    <compoundname>vfs.cpp</compoundname>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*#include<sp/>&lt;stdio.h&gt;</highlight></codeline>
<codeline lineno="2"><highlight class="comment">#include<sp/>&quot;vfs.h&quot;</highlight></codeline>
<codeline lineno="3"><highlight class="comment"></highlight></codeline>
<codeline lineno="4"><highlight class="comment">DiskFS::DiskFS(const<sp/>char<sp/>*<sp/>filename)<sp/>{</highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/><sp/>diskFile<sp/>=<sp/>fopen(filename,<sp/>&quot;r+&quot;);</highlight></codeline>
<codeline lineno="6"><highlight class="comment">}<sp/>//<sp/>DiskFS::DiskFS</highlight></codeline>
<codeline lineno="7"><highlight class="comment"></highlight></codeline>
<codeline lineno="8"><highlight class="comment">int</highlight></codeline>
<codeline lineno="9"><highlight class="comment">DiskFS::write(const<sp/>void<sp/>*<sp/>data,<sp/>long<sp/>offset,<sp/>long<sp/>size)<sp/>{</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/><sp/>if<sp/>(diskFile<sp/>==<sp/>NULL)<sp/>return<sp/>1;</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/><sp/>fseek(diskFile,<sp/>offset,<sp/>SEEK_SET);</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/><sp/>fwrite(data,<sp/>size,<sp/>1,<sp/>diskFile);</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/><sp/>return<sp/>0;</highlight></codeline>
<codeline lineno="14"><highlight class="comment">}<sp/>//<sp/>DiskFS::write</highlight></codeline>
<codeline lineno="15"><highlight class="comment"></highlight></codeline>
<codeline lineno="16"><highlight class="comment">int</highlight></codeline>
<codeline lineno="17"><highlight class="comment">DiskFS::read(void<sp/>*<sp/>data,<sp/>long<sp/>offset,<sp/>long<sp/>size)<sp/>{</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/><sp/>if<sp/>(diskFile<sp/>==<sp/>NULL)<sp/>return<sp/>1;</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/><sp/>fseek(diskFile,<sp/>offset,<sp/>SEEK_SET);</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/><sp/>fread(data,<sp/>size,<sp/>1,<sp/>diskFile);</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/><sp/>return<sp/>0;</highlight></codeline>
<codeline lineno="22"><highlight class="comment">}<sp/>//<sp/>DiskFS::read</highlight></codeline>
<codeline lineno="23"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/fs/ubixfsv2/vfs.cpp"/>
  </compounddef>
</doxygen>
