<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>The Red Matrix: RedFile Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="rm-64.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">The Red Matrix
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classRedFile.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classRedFile-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">RedFile Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for RedFile:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classRedFile.png" usemap="#RedFile_map" alt=""/>
  <map id="RedFile_map" name="RedFile_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9a67bdb34c9db6ce144b3f371148b183"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRedFile.html#a9a67bdb34c9db6ce144b3f371148b183">__construct</a> ($name, $data, &amp;$auth)</td></tr>
<tr class="separator:a9a67bdb34c9db6ce144b3f371148b183"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c961c5f49544d2502420361fa526437"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRedFile.html#a0c961c5f49544d2502420361fa526437">getName</a> ()</td></tr>
<tr class="memdesc:a0c961c5f49544d2502420361fa526437"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name of the file.  <a href="#a0c961c5f49544d2502420361fa526437">More...</a><br/></td></tr>
<tr class="separator:a0c961c5f49544d2502420361fa526437"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38a82bfc1b30028ea6ac75923e90fa25"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRedFile.html#a38a82bfc1b30028ea6ac75923e90fa25">setName</a> ($newName)</td></tr>
<tr class="memdesc:a38a82bfc1b30028ea6ac75923e90fa25"><td class="mdescLeft">&#160;</td><td class="mdescRight">Renames the file.  <a href="#a38a82bfc1b30028ea6ac75923e90fa25">More...</a><br/></td></tr>
<tr class="separator:a38a82bfc1b30028ea6ac75923e90fa25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41a49a583eb276b75626fcf97f4a699c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRedFile.html#a41a49a583eb276b75626fcf97f4a699c">put</a> ($data)</td></tr>
<tr class="memdesc:a41a49a583eb276b75626fcf97f4a699c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the data of the file.  <a href="#a41a49a583eb276b75626fcf97f4a699c">More...</a><br/></td></tr>
<tr class="separator:a41a49a583eb276b75626fcf97f4a699c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c868dfcef6c70cd0e24cf3caa2c3535"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRedFile.html#a7c868dfcef6c70cd0e24cf3caa2c3535">get</a> ()</td></tr>
<tr class="memdesc:a7c868dfcef6c70cd0e24cf3caa2c3535"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the raw data.  <a href="#a7c868dfcef6c70cd0e24cf3caa2c3535">More...</a><br/></td></tr>
<tr class="separator:a7c868dfcef6c70cd0e24cf3caa2c3535"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae96d5caa2db7a461c57b24380fa87e28"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRedFile.html#ae96d5caa2db7a461c57b24380fa87e28">getETag</a> ()</td></tr>
<tr class="memdesc:ae96d5caa2db7a461c57b24380fa87e28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the ETag for a file.  <a href="#ae96d5caa2db7a461c57b24380fa87e28">More...</a><br/></td></tr>
<tr class="separator:ae96d5caa2db7a461c57b24380fa87e28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26416827eb68554d033d1e2e5cc6dd3b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRedFile.html#a26416827eb68554d033d1e2e5cc6dd3b">getContentType</a> ()</td></tr>
<tr class="memdesc:a26416827eb68554d033d1e2e5cc6dd3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the mime-type for a file.  <a href="#a26416827eb68554d033d1e2e5cc6dd3b">More...</a><br/></td></tr>
<tr class="separator:a26416827eb68554d033d1e2e5cc6dd3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb1edbe1848fab05347746fa1ea09d8f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRedFile.html#acb1edbe1848fab05347746fa1ea09d8f">getSize</a> ()</td></tr>
<tr class="memdesc:acb1edbe1848fab05347746fa1ea09d8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size of the node, in bytes.  <a href="#acb1edbe1848fab05347746fa1ea09d8f">More...</a><br/></td></tr>
<tr class="separator:acb1edbe1848fab05347746fa1ea09d8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41562a28007789bbe7fe06d6a20eef47"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRedFile.html#a41562a28007789bbe7fe06d6a20eef47">getLastModified</a> ()</td></tr>
<tr class="memdesc:a41562a28007789bbe7fe06d6a20eef47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the last modification time for the file, as a unix timestamp.  <a href="#a41562a28007789bbe7fe06d6a20eef47">More...</a><br/></td></tr>
<tr class="separator:a41562a28007789bbe7fe06d6a20eef47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef71c9eaac7052be7dc8602eb12171e7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRedFile.html#aef71c9eaac7052be7dc8602eb12171e7">delete</a> ()</td></tr>
<tr class="memdesc:aef71c9eaac7052be7dc8602eb12171e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete the file.  <a href="#aef71c9eaac7052be7dc8602eb12171e7">More...</a><br/></td></tr>
<tr class="separator:aef71c9eaac7052be7dc8602eb12171e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a2ff12032b45538353eded9809d3b7550"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRedFile.html#a2ff12032b45538353eded9809d3b7550">$data</a></td></tr>
<tr class="separator:a2ff12032b45538353eded9809d3b7550"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b5d0e33f919c6c175b30a55de6263f2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRedFile.html#a4b5d0e33f919c6c175b30a55de6263f2">$auth</a></td></tr>
<tr class="separator:a4b5d0e33f919c6c175b30a55de6263f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc48c05cd5a70951cb3c615ad84f03ba"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRedFile.html#acc48c05cd5a70951cb3c615ad84f03ba">$name</a></td></tr>
<tr class="separator:acc48c05cd5a70951cb3c615ad84f03ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classRedFile.html">RedFile</a> class. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a9a67bdb34c9db6ce144b3f371148b183"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RedFile::__construct </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&amp;&#160;</td>
          <td class="paramname"><em>$auth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets up the node, expects a full path name.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">string</td><td class="paramname">$name</td><td></td></tr>
    <tr><td class="paramtype">array</td><td class="paramname">$data</td><td>from attach table </td></tr>
    <tr><td class="paramtype"></td><td class="paramname">&amp;$auth</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aef71c9eaac7052be7dc8602eb12171e7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RedFile::delete </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Delete the file. </p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">DAV\Exception\Forbidden</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

</div>
</div>
<a class="anchor" id="a7c868dfcef6c70cd0e24cf3caa2c3535"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RedFile::get </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the raw data. </p>
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>

</div>
</div>
<a class="anchor" id="a26416827eb68554d033d1e2e5cc6dd3b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RedFile::getContentType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the mime-type for a file. </p>
<p>If null is returned, we'll assume application/octet-stream</p>
<dl class="section return"><dt>Returns</dt><dd>mixed </dd></dl>

</div>
</div>
<a class="anchor" id="ae96d5caa2db7a461c57b24380fa87e28"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RedFile::getETag </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the ETag for a file. </p>
<p>An ETag is a unique identifier representing the current version of the file. If the file changes, the ETag MUST change. The ETag is an arbitrary string, but MUST be surrounded by double-quotes.</p>
<p>Return null if the ETag can not effectively be determined.</p>
<dl class="section return"><dt>Returns</dt><dd>mixed </dd></dl>

</div>
</div>
<a class="anchor" id="a41562a28007789bbe7fe06d6a20eef47"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RedFile::getLastModified </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the last modification time for the file, as a unix timestamp. </p>
<dl class="section return"><dt>Returns</dt><dd>int last modification time in UNIX timestamp </dd></dl>

</div>
</div>
<a class="anchor" id="a0c961c5f49544d2502420361fa526437"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RedFile::getName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the name of the file. </p>
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>

</div>
</div>
<a class="anchor" id="acb1edbe1848fab05347746fa1ea09d8f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RedFile::getSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the size of the node, in bytes. </p>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<a class="anchor" id="a41a49a583eb276b75626fcf97f4a699c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RedFile::put </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Updates the data of the file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">resource</td><td class="paramname">$data</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

</div>
</div>
<a class="anchor" id="a38a82bfc1b30028ea6ac75923e90fa25"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RedFile::setName </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$newName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Renames the file. </p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">DAV\Exception\Forbidden</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">string</td><td class="paramname">$name</td><td>The new name of the file. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a4b5d0e33f919c6c175b30a55de6263f2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RedFile::$auth</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="classRedFile.html#a9a67bdb34c9db6ce144b3f371148b183">__construct()</a>.</p>

</div>
</div>
<a class="anchor" id="a2ff12032b45538353eded9809d3b7550"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RedFile::$data</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="classRedFile.html#a9a67bdb34c9db6ce144b3f371148b183">__construct()</a>, and <a class="el" href="classRedFile.html#a41a49a583eb276b75626fcf97f4a699c">put()</a>.</p>

</div>
</div>
<a class="anchor" id="acc48c05cd5a70951cb3c615ad84f03ba"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RedFile::$name</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="classRedFile.html#a9a67bdb34c9db6ce144b3f371148b183">__construct()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/<a class="el" href="reddav_8php.html">reddav.php</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->