519 lines
34 KiB
HTML
519 lines
34 KiB
HTML
<!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.6"/>
|
|
<title>Shaka Packager SDK: shaka::LocalFile 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="../../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 style="padding-left: 0.5em;">
|
|
<div id="projectname">Shaka Packager SDK
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.6 -->
|
|
<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 Page</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 List</span></a></li>
|
|
<li><a href="../../classes.html"><span>Class Index</span></a></li>
|
|
<li><a href="../../hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="../../functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<!-- 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"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Friends</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 id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="../../d8/daf/namespaceshaka.html">shaka</a></li><li class="navelem"><a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html">LocalFile</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pub-static-methods">Static Public Member Functions</a> |
|
|
<a href="#pro-methods">Protected Member Functions</a> |
|
|
<a href="../../d8/d81/classshaka_1_1LocalFile-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">shaka::LocalFile Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Implement <a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html" title="Implement LocalFile which deals with local storage. ">LocalFile</a> which deals with local storage.
|
|
<a href="../../d7/dbd/classshaka_1_1LocalFile.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="../../de/d0f/local__file_8h_source.html">local_file.h</a>></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for shaka::LocalFile:</div>
|
|
<div class="dyncontent">
|
|
<div class="center">
|
|
<img src="../../d7/dbd/classshaka_1_1LocalFile.png" usemap="#shaka::LocalFile_map" alt=""/>
|
|
<map id="shaka::LocalFile_map" name="shaka::LocalFile_map">
|
|
<area href="../../d3/d73/classshaka_1_1File.html" title="Define an abstract file interface. " alt="shaka::File" shape="rect" coords="0,0,103,24"/>
|
|
</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:a2bc14434191cdc36e7e9f67c6ebf282f"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html#a2bc14434191cdc36e7e9f67c6ebf282f">LocalFile</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a463be34c40e47f95510e991678b34605">file_name</a>, const char *mode)</td></tr>
|
|
<tr class="separator:a2bc14434191cdc36e7e9f67c6ebf282f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr><td colspan="2"><div class="groupHeader">File implementation overrides.</div></td></tr>
|
|
<tr class="memitem:a3d881c251c19a36eaf50483971095370"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html#a3d881c251c19a36eaf50483971095370">Close</a> () override</td></tr>
|
|
<tr class="separator:a3d881c251c19a36eaf50483971095370"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a27c3bf51fe18ebc10bf42ebcec20c9cb"><td class="memItemLeft" align="right" valign="top">int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html#a27c3bf51fe18ebc10bf42ebcec20c9cb">Read</a> (void *buffer, uint64_t length) override</td></tr>
|
|
<tr class="separator:a27c3bf51fe18ebc10bf42ebcec20c9cb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aee10b7f2898c5047eb8505f16c49311c"><td class="memItemLeft" align="right" valign="top">int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html#aee10b7f2898c5047eb8505f16c49311c">Write</a> (const void *buffer, uint64_t length) override</td></tr>
|
|
<tr class="separator:aee10b7f2898c5047eb8505f16c49311c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad20649d0ee575b81830a5abf88e2bde1"><td class="memItemLeft" align="right" valign="top">int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html#ad20649d0ee575b81830a5abf88e2bde1">Size</a> () override</td></tr>
|
|
<tr class="separator:ad20649d0ee575b81830a5abf88e2bde1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a04b4523a7352572b2c6d72f1d6f3a077"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html#a04b4523a7352572b2c6d72f1d6f3a077">Flush</a> () override</td></tr>
|
|
<tr class="separator:a04b4523a7352572b2c6d72f1d6f3a077"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a082cd6d64c8f04acff251cdafb66b203"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html#a082cd6d64c8f04acff251cdafb66b203">Seek</a> (uint64_t position) override</td></tr>
|
|
<tr class="separator:a082cd6d64c8f04acff251cdafb66b203"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af111d93e10ae0128f082eef77eaa914b"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html#af111d93e10ae0128f082eef77eaa914b">Tell</a> (uint64_t *position) override</td></tr>
|
|
<tr class="separator:af111d93e10ae0128f082eef77eaa914b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="inherit_header pub_methods_classshaka_1_1File"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshaka_1_1File')"><img src="../../closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="../../d3/d73/classshaka_1_1File.html">shaka::File</a></td></tr>
|
|
<tr class="memitem:a463be34c40e47f95510e991678b34605 inherit pub_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">const std::string & </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a463be34c40e47f95510e991678b34605">file_name</a> () const </td></tr>
|
|
<tr class="separator:a463be34c40e47f95510e991678b34605 inherit pub_methods_classshaka_1_1File"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
|
|
Static Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a7eb47bb6ceff52c57e3eb4a21fb0ba8d"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html#a7eb47bb6ceff52c57e3eb4a21fb0ba8d">Delete</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a463be34c40e47f95510e991678b34605">file_name</a>)</td></tr>
|
|
<tr class="separator:a7eb47bb6ceff52c57e3eb4a21fb0ba8d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="inherit_header pub_static_methods_classshaka_1_1File"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classshaka_1_1File')"><img src="../../closed.png" alt="-"/> Static Public Member Functions inherited from <a class="el" href="../../d3/d73/classshaka_1_1File.html">shaka::File</a></td></tr>
|
|
<tr class="memitem:ac7b5143f9b8c3e786762fe4ada2b8dcf inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d3/d73/classshaka_1_1File.html">File</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#ac7b5143f9b8c3e786762fe4ada2b8dcf">Open</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a463be34c40e47f95510e991678b34605">file_name</a>, const char *mode)</td></tr>
|
|
<tr class="separator:ac7b5143f9b8c3e786762fe4ada2b8dcf inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0a50526352bd6e946c4f33d3e8431b2d inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d3/d73/classshaka_1_1File.html">File</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a0a50526352bd6e946c4f33d3e8431b2d">OpenWithNoBuffering</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a463be34c40e47f95510e991678b34605">file_name</a>, const char *mode)</td></tr>
|
|
<tr class="separator:a0a50526352bd6e946c4f33d3e8431b2d inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a383c9f670511961f334569fd1a7a103b inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a383c9f670511961f334569fd1a7a103b">Delete</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a463be34c40e47f95510e991678b34605">file_name</a>)</td></tr>
|
|
<tr class="separator:a383c9f670511961f334569fd1a7a103b inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac978d5c0585850d4d9948fdf39b33292 inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#ac978d5c0585850d4d9948fdf39b33292">GetFileSize</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a463be34c40e47f95510e991678b34605">file_name</a>)</td></tr>
|
|
<tr class="separator:ac978d5c0585850d4d9948fdf39b33292 inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac9a19cb5fc45664ca440996bf1201c30 inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#ac9a19cb5fc45664ca440996bf1201c30">ReadFileToString</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a463be34c40e47f95510e991678b34605">file_name</a>, std::string *contents)</td></tr>
|
|
<tr class="separator:ac9a19cb5fc45664ca440996bf1201c30 inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a483ce187d628385d342748315d72f8ab inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a483ce187d628385d342748315d72f8ab">WriteStringToFile</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a463be34c40e47f95510e991678b34605">file_name</a>, const std::string &contents)</td></tr>
|
|
<tr class="separator:a483ce187d628385d342748315d72f8ab inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4b5280fe058359b5991037f90dde2b77 inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a4b5280fe058359b5991037f90dde2b77">WriteFileAtomically</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a463be34c40e47f95510e991678b34605">file_name</a>, const std::string &contents)</td></tr>
|
|
<tr class="separator:a4b5280fe058359b5991037f90dde2b77 inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af2cbec5c6dc1c97ada010acd83b9728a inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#af2cbec5c6dc1c97ada010acd83b9728a">Copy</a> (const char *from_file_name, const char *to_file_name)</td></tr>
|
|
<tr class="separator:af2cbec5c6dc1c97ada010acd83b9728a inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a85633ec9f051eb9f32b07ff7e7740d1c inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a85633ec9f051eb9f32b07ff7e7740d1c">CopyFile</a> (<a class="el" href="../../d3/d73/classshaka_1_1File.html">File</a> *source, <a class="el" href="../../d3/d73/classshaka_1_1File.html">File</a> *destination)</td></tr>
|
|
<tr class="separator:a85633ec9f051eb9f32b07ff7e7740d1c inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a07e2d2f98597320f71fb96dff74cfcb2 inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a07e2d2f98597320f71fb96dff74cfcb2">CopyFile</a> (<a class="el" href="../../d3/d73/classshaka_1_1File.html">File</a> *source, <a class="el" href="../../d3/d73/classshaka_1_1File.html">File</a> *destination, int64_t max_copy)</td></tr>
|
|
<tr class="separator:a07e2d2f98597320f71fb96dff74cfcb2 inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7a90ebd27f7728a7075cf3ba97396cae inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a7a90ebd27f7728a7075cf3ba97396cae">MakeCallbackFileName</a> (const <a class="el" href="../../d9/da8/structshaka_1_1BufferCallbackParams.html">BufferCallbackParams</a> &callback_params, const std::string &name)</td></tr>
|
|
<tr class="separator:a7a90ebd27f7728a7075cf3ba97396cae inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae87642f9661588e47479721cd101bf7d inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#ae87642f9661588e47479721cd101bf7d">ParseCallbackFileName</a> (const std::string &callback_file_name, const <a class="el" href="../../d9/da8/structshaka_1_1BufferCallbackParams.html">BufferCallbackParams</a> **callback_params, std::string *name)</td></tr>
|
|
<tr class="separator:ae87642f9661588e47479721cd101bf7d inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
|
|
Protected Member Functions</h2></td></tr>
|
|
<tr class="memitem:a8de3e633211e896c43319a5b6f080804"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8de3e633211e896c43319a5b6f080804"></a>
|
|
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html#a8de3e633211e896c43319a5b6f080804">Open</a> () override</td></tr>
|
|
<tr class="memdesc:a8de3e633211e896c43319a5b6f080804"><td class="mdescLeft"> </td><td class="mdescRight">Internal open. Should not be used directly. <br/></td></tr>
|
|
<tr class="separator:a8de3e633211e896c43319a5b6f080804"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="inherit_header pro_methods_classshaka_1_1File"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classshaka_1_1File')"><img src="../../closed.png" alt="-"/> Protected Member Functions inherited from <a class="el" href="../../d3/d73/classshaka_1_1File.html">shaka::File</a></td></tr>
|
|
<tr class="memitem:a33ead01d4090de618937d4e989a9f27f inherit pro_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a33ead01d4090de618937d4e989a9f27f"></a>
|
|
 </td><td class="memItemRight" valign="bottom"><b>File</b> (const std::string &<a class="el" href="../../d3/d73/classshaka_1_1File.html#a463be34c40e47f95510e991678b34605">file_name</a>)</td></tr>
|
|
<tr class="separator:a33ead01d4090de618937d4e989a9f27f inherit pro_methods_classshaka_1_1File"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a92d1a67d1560a5290eb36447c50fabf9 inherit pro_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a92d1a67d1560a5290eb36447c50fabf9">~File</a> ()</td></tr>
|
|
<tr class="separator:a92d1a67d1560a5290eb36447c50fabf9 inherit pro_methods_classshaka_1_1File"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>Implement <a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html" title="Implement LocalFile which deals with local storage. ">LocalFile</a> which deals with local storage. </p>
|
|
|
|
<p>Definition at line <a class="el" href="../../de/d0f/local__file_8h_source.html#l00020">20</a> of file <a class="el" href="../../de/d0f/local__file_8h_source.html">local_file.h</a>.</p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" id="a2bc14434191cdc36e7e9f67c6ebf282f"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">shaka::LocalFile::LocalFile </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>file_name</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>mode</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">file_name</td><td>C string containing the name of the file to be accessed. </td></tr>
|
|
<tr><td class="paramname">mode</td><td>C string containing a file access mode, refer to fopen for the available modes. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Definition at line <a class="el" href="../../d6/de8/local__file_8cc_source.html#l00021">21</a> of file <a class="el" href="../../d6/de8/local__file_8cc_source.html">local_file.cc</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a class="anchor" id="a3d881c251c19a36eaf50483971095370"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool shaka::LocalFile::Close </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p><a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html#a04b4523a7352572b2c6d72f1d6f3a077">Flush()</a> and de-allocate resources associated with this file, and delete this <a class="el" href="../../d3/d73/classshaka_1_1File.html" title="Define an abstract file interface. ">File</a> object. THIS IS THE ONE TRUE WAY TO DEALLOCATE THIS OBJECT. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>true on success. For writable files, returning false MAY INDICATE DATA LOSS. </dd></dl>
|
|
|
|
<p>Implements <a class="el" href="../../d3/d73/classshaka_1_1File.html#a932666ed1d6a565bf387a9d8b39a8948">shaka::File</a>.</p>
|
|
|
|
<p>Definition at line <a class="el" href="../../d6/de8/local__file_8cc_source.html#l00027">27</a> of file <a class="el" href="../../d6/de8/local__file_8cc_source.html">local_file.cc</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a7eb47bb6ceff52c57e3eb4a21fb0ba8d"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool shaka::LocalFile::Delete </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>file_name</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Delete a local file. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">file_name</td><td>is the path of the file to be deleted. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>true if successful, or false otherwise. </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="../../d6/de8/local__file_8cc_source.html#l00126">126</a> of file <a class="el" href="../../d6/de8/local__file_8cc_source.html">local_file.cc</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a04b4523a7352572b2c6d72f1d6f3a077"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool shaka::LocalFile::Flush </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Flush the file so that recently written data will survive an application crash (but not necessarily an OS crash). For instance, in <a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html" title="Implement LocalFile which deals with local storage. ">LocalFile</a> the data is flushed into the OS but not necessarily to disk. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>true on success, false otherwise. </dd></dl>
|
|
|
|
<p>Implements <a class="el" href="../../d3/d73/classshaka_1_1File.html#a5fa625751e03b9e7652ba1bfa98b8ca4">shaka::File</a>.</p>
|
|
|
|
<p>Definition at line <a class="el" href="../../d6/de8/local__file_8cc_source.html#l00079">79</a> of file <a class="el" href="../../d6/de8/local__file_8cc_source.html">local_file.cc</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a27c3bf51fe18ebc10bf42ebcec20c9cb"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int64_t shaka::LocalFile::Read </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"><em>buffer</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint64_t </td>
|
|
<td class="paramname"><em>length</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Read data and return it in buffer. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">buffer</td><td>points to a block of memory with a size of at least <em>length</em> bytes. </td></tr>
|
|
<tr><td class="paramdir"></td><td class="paramname">length</td><td>indicates number of bytes to be read. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Number of bytes read, or a value < 0 on error. Zero on end-of-file, or if 'length' is zero. </dd></dl>
|
|
|
|
<p>Implements <a class="el" href="../../d3/d73/classshaka_1_1File.html#a6e1ecb2904b609554d332290f20fde0a">shaka::File</a>.</p>
|
|
|
|
<p>Definition at line <a class="el" href="../../d6/de8/local__file_8cc_source.html#l00037">37</a> of file <a class="el" href="../../d6/de8/local__file_8cc_source.html">local_file.cc</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a082cd6d64c8f04acff251cdafb66b203"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool shaka::LocalFile::Seek </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint64_t </td>
|
|
<td class="paramname"><em>position</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Seek to the specifield position in the file. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">position</td><td>is the position to seek to. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>true on success, false otherwise. </dd></dl>
|
|
|
|
<p>Implements <a class="el" href="../../d3/d73/classshaka_1_1File.html#a486bda715b58b1a1863fbfc8d48da62a">shaka::File</a>.</p>
|
|
|
|
<p>Definition at line <a class="el" href="../../d6/de8/local__file_8cc_source.html#l00084">84</a> of file <a class="el" href="../../d6/de8/local__file_8cc_source.html">local_file.cc</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ad20649d0ee575b81830a5abf88e2bde1"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int64_t shaka::LocalFile::Size </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>Size of the file in bytes. A return value less than zero indicates a problem getting the size. </dd></dl>
|
|
|
|
<p>Implements <a class="el" href="../../d3/d73/classshaka_1_1File.html#aeb98b64a05f141140e110170bef1bc55">shaka::File</a>.</p>
|
|
|
|
<p>Definition at line <a class="el" href="../../d6/de8/local__file_8cc_source.html#l00061">61</a> of file <a class="el" href="../../d6/de8/local__file_8cc_source.html">local_file.cc</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="af111d93e10ae0128f082eef77eaa914b"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool shaka::LocalFile::Tell </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint64_t * </td>
|
|
<td class="paramname"><em>position</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Get the current file position. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">position</td><td>is a pointer to contain the current file position upon successful return. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>true on succcess, false otherwise. </dd></dl>
|
|
|
|
<p>Implements <a class="el" href="../../d3/d73/classshaka_1_1File.html#a07ae6476e88dab6c0cd9d8c0073b667d">shaka::File</a>.</p>
|
|
|
|
<p>Definition at line <a class="el" href="../../d6/de8/local__file_8cc_source.html#l00093">93</a> of file <a class="el" href="../../d6/de8/local__file_8cc_source.html">local_file.cc</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aee10b7f2898c5047eb8505f16c49311c"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int64_t shaka::LocalFile::Write </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const void * </td>
|
|
<td class="paramname"><em>buffer</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint64_t </td>
|
|
<td class="paramname"><em>length</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Write block of data. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">buffer</td><td>points to a block of memory with at least <em>length</em> bytes. </td></tr>
|
|
<tr><td class="paramname">length</td><td>indicates number of bytes to write. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Number of bytes written, or a value < 0 on error. </dd></dl>
|
|
|
|
<p>Implements <a class="el" href="../../d3/d73/classshaka_1_1File.html#a8c498531ecbd205fceb0be3478361801">shaka::File</a>.</p>
|
|
|
|
<p>Definition at line <a class="el" href="../../d6/de8/local__file_8cc_source.html#l00049">49</a> of file <a class="el" href="../../d6/de8/local__file_8cc_source.html">local_file.cc</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following files:<ul>
|
|
<li>packager/file/<a class="el" href="../../de/d0f/local__file_8h_source.html">local_file.h</a></li>
|
|
<li>packager/file/<a class="el" href="../../d6/de8/local__file_8cc_source.html">local_file.cc</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Tue Oct 24 2017 15:50:09 for Shaka Packager SDK by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.6
|
|
</small></address>
|
|
</body>
|
|
</html>
|