2017-09-20 02:35:05 +00:00
<!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: packager/file/file.h Source File< / 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 > < a href = "../../annotated.html" > < span > Classes< / span > < / a > < / li >
< li class = "current" > < 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 = "../../files.html" > < span > File  List< / 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 = "../../dir_3f8eec2fc361645de4b1ec14c19fffc7.html" > packager< / a > < / li > < li class = "navelem" > < a class = "el" href = "../../dir_d258fb6e36cbaad69b44b6c9489b2bbb.html" > file< / a > < / li > < / ul >
< / div >
< / div > <!-- top -->
< div class = "header" >
< div class = "headertitle" >
< div class = "title" > file.h< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< div class = "fragment" > < div class = "line" > < a name = "l00001" > < / a > < span class = "lineno" > 1< / span >   < span class = "comment" > // Copyright 2014 Google Inc. All rights reserved.< / span > < / div >
< div class = "line" > < a name = "l00002" > < / a > < span class = "lineno" > 2< / span >   < span class = "comment" > //< / span > < / div >
< div class = "line" > < a name = "l00003" > < / a > < span class = "lineno" > 3< / span >   < span class = "comment" > // Use of this source code is governed by a BSD-style< / span > < / div >
< div class = "line" > < a name = "l00004" > < / a > < span class = "lineno" > 4< / span >   < span class = "comment" > // license that can be found in the LICENSE file or at< / span > < / div >
< div class = "line" > < a name = "l00005" > < / a > < span class = "lineno" > 5< / span >   < span class = "comment" > // https://developers.google.com/open-source/licenses/bsd< / span > < / div >
< div class = "line" > < a name = "l00006" > < / a > < span class = "lineno" > 6< / span >   < / div >
< div class = "line" > < a name = "l00007" > < / a > < span class = "lineno" > 7< / span >   < span class = "preprocessor" > #ifndef PACKAGER_FILE_FILE_H_< / span > < / div >
< div class = "line" > < a name = "l00008" > < / a > < span class = "lineno" > 8< / span >   < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define PACKAGER_FILE_FILE_H_< / span > < / div >
< div class = "line" > < a name = "l00009" > < / a > < span class = "lineno" > 9< / span >   < span class = "preprocessor" > < / span > < / div >
< div class = "line" > < a name = "l00010" > < / a > < span class = "lineno" > 10< / span >   < span class = "preprocessor" > #include < stdint.h> < / span > < / div >
< div class = "line" > < a name = "l00011" > < / a > < span class = "lineno" > 11< / span >   < / div >
< div class = "line" > < a name = "l00012" > < / a > < span class = "lineno" > 12< / span >   < span class = "preprocessor" > #include < string> < / span > < / div >
< div class = "line" > < a name = "l00013" > < / a > < span class = "lineno" > 13< / span >   < / div >
< div class = "line" > < a name = "l00014" > < / a > < span class = "lineno" > 14< / span >   < span class = "preprocessor" > #include " packager/base/macros.h" < / span > < / div >
< div class = "line" > < a name = "l00015" > < / a > < span class = "lineno" > 15< / span >   < span class = "preprocessor" > #include " packager/file/public/buffer_callback_params.h" < / span > < / div >
< div class = "line" > < a name = "l00016" > < / a > < span class = "lineno" > 16< / span >   < / div >
< div class = "line" > < a name = "l00017" > < / a > < span class = "lineno" > 17< / span >   < span class = "keyword" > namespace < / span > shaka {< / div >
< div class = "line" > < a name = "l00018" > < / a > < span class = "lineno" > 18< / span >   < / div >
< div class = "line" > < a name = "l00019" > < / a > < span class = "lineno" > 19< / span >   < span class = "keyword" > extern< / span > < span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * kCallbackFilePrefix;< / div >
< div class = "line" > < a name = "l00020" > < / a > < span class = "lineno" > 20< / span >   < span class = "keyword" > extern< / span > < span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * kLocalFilePrefix;< / div >
< div class = "line" > < a name = "l00021" > < / a > < span class = "lineno" > 21< / span >   < span class = "keyword" > extern< / span > < span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * kMemoryFilePrefix;< / div >
< div class = "line" > < a name = "l00022" > < / a > < span class = "lineno" > 22< / span >   < span class = "keyword" > extern< / span > < span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * kUdpFilePrefix;< / div >
< div class = "line" > < a name = "l00023" > < / a > < span class = "lineno" > 23< / span >   < span class = "keyword" > const< / span > int64_t kWholeFile = -1;< / div >
< div class = "line" > < a name = "l00024" > < / a > < span class = "lineno" > 24< / span >   < / div >
< div class = "line" > < a name = "l00026" > < / a > < span class = "lineno" > < a class = "line" href = "../../d3/d73/classshaka_1_1File.html" > 26< / a > < / span >   < span class = "keyword" > class < / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html" > File< / a > {< / div >
< div class = "line" > < a name = "l00027" > < / a > < span class = "lineno" > 27< / span >   < span class = "keyword" > public< / span > :< / div >
< div class = "line" > < a name = "l00034" > < / a > < span class = "lineno" > 34< / span >   < span class = "keyword" > static< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html" > File< / a > * < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a68a15f623c2a1601879f291f93a1f464" > Open< / a > (< span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a463be34c40e47f95510e991678b34605" > file_name< / a > , < span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * mode);< / div >
< div class = "line" > < a name = "l00035" > < / a > < span class = "lineno" > 35< / span >   < / div >
< div class = "line" > < a name = "l00042" > < / a > < span class = "lineno" > 42< / span >   < span class = "keyword" > static< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html" > File< / a > * < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a0a50526352bd6e946c4f33d3e8431b2d" > OpenWithNoBuffering< / a > (< span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * file_name, < span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * mode);< / div >
< div class = "line" > < a name = "l00043" > < / a > < span class = "lineno" > 43< / span >   < / div >
< div class = "line" > < a name = "l00047" > < / a > < span class = "lineno" > 47< / span >   < span class = "keyword" > static< / span > < span class = "keywordtype" > bool< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a383c9f670511961f334569fd1a7a103b" > Delete< / a > (< span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * file_name);< / div >
< div class = "line" > < a name = "l00048" > < / a > < span class = "lineno" > 48< / span >   < / div >
< div class = "line" > < a name = "l00054" > < / a > < span class = "lineno" > 54< / span >   < span class = "keyword" > virtual< / span > < span class = "keywordtype" > bool< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a932666ed1d6a565bf387a9d8b39a8948" > Close< / a > () = 0;< / div >
< div class = "line" > < a name = "l00055" > < / a > < span class = "lineno" > 55< / span >   < / div >
< div class = "line" > < a name = "l00062" > < / a > < span class = "lineno" > 62< / span >   < span class = "keyword" > virtual< / span > int64_t < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a6e1ecb2904b609554d332290f20fde0a" > Read< / a > (< span class = "keywordtype" > void< / span > * buffer, uint64_t length) = 0;< / div >
< div class = "line" > < a name = "l00063" > < / a > < span class = "lineno" > 63< / span >   < / div >
< div class = "line" > < a name = "l00068" > < / a > < span class = "lineno" > 68< / span >   < span class = "keyword" > virtual< / span > int64_t < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a8c498531ecbd205fceb0be3478361801" > Write< / a > (< span class = "keyword" > const< / span > < span class = "keywordtype" > void< / span > * buffer, uint64_t length) = 0;< / div >
< div class = "line" > < a name = "l00069" > < / a > < span class = "lineno" > 69< / span >   < / div >
< div class = "line" > < a name = "l00072" > < / a > < span class = "lineno" > 72< / span >   < span class = "keyword" > virtual< / span > int64_t < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#aeb98b64a05f141140e110170bef1bc55" > Size< / a > () = 0;< / div >
< div class = "line" > < a name = "l00073" > < / a > < span class = "lineno" > 73< / span >   < / div >
< div class = "line" > < a name = "l00079" > < / a > < span class = "lineno" > 79< / span >   < span class = "keyword" > virtual< / span > < span class = "keywordtype" > bool< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a5fa625751e03b9e7652ba1bfa98b8ca4" > Flush< / a > () = 0;< / div >
< div class = "line" > < a name = "l00080" > < / a > < span class = "lineno" > 80< / span >   < / div >
< div class = "line" > < a name = "l00084" > < / a > < span class = "lineno" > 84< / span >   < span class = "keyword" > virtual< / span > < span class = "keywordtype" > bool< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a486bda715b58b1a1863fbfc8d48da62a" > Seek< / a > (uint64_t position) = 0;< / div >
< div class = "line" > < a name = "l00085" > < / a > < span class = "lineno" > 85< / span >   < / div >
< div class = "line" > < a name = "l00090" > < / a > < span class = "lineno" > 90< / span >   < span class = "keyword" > virtual< / span > < span class = "keywordtype" > bool< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a07ae6476e88dab6c0cd9d8c0073b667d" > Tell< / a > (uint64_t* position) = 0;< / div >
< div class = "line" > < a name = "l00091" > < / a > < span class = "lineno" > 91< / span >   < / div >
< div class = "line" > < a name = "l00094" > < / a > < span class = "lineno" > < a class = "line" href = "../../d3/d73/classshaka_1_1File.html#a463be34c40e47f95510e991678b34605" > 94< / a > < / span >   < span class = "keyword" > const< / span > std::string& < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a463be34c40e47f95510e991678b34605" > file_name< / a > ()< span class = "keyword" > const < / span > { < span class = "keywordflow" > return< / span > file_name_; }< / div >
< div class = "line" > < a name = "l00095" > < / a > < span class = "lineno" > 95< / span >   < / div >
< div class = "line" > < a name = "l00096" > < / a > < span class = "lineno" > 96< / span >   < span class = "comment" > // ************************************************************< / span > < / div >
< div class = "line" > < a name = "l00097" > < / a > < span class = "lineno" > 97< / span >   < span class = "comment" > // * Static Methods: File-on-the-filesystem status< / span > < / div >
< div class = "line" > < a name = "l00098" > < / a > < span class = "lineno" > 98< / span >   < span class = "comment" > // ************************************************************< / span > < / div >
< div class = "line" > < a name = "l00099" > < / a > < span class = "lineno" > 99< / span >   < / div >
< div class = "line" > < a name = "l00102" > < / a > < span class = "lineno" > 102< / span >   < span class = "keyword" > static< / span > int64_t < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#ac978d5c0585850d4d9948fdf39b33292" > GetFileSize< / a > (< span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * file_name);< / div >
< div class = "line" > < a name = "l00103" > < / a > < span class = "lineno" > 103< / span >   < / div >
< div class = "line" > < a name = "l00108" > < / a > < span class = "lineno" > 108< / span >   < span class = "keyword" > static< / span > < span class = "keywordtype" > bool< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#ac9a19cb5fc45664ca440996bf1201c30" > ReadFileToString< / a > (< span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * file_name, std::string* contents);< / div >
< div class = "line" > < a name = "l00109" > < / a > < span class = "lineno" > 109< / span >   < / div >
< div class = "line" > < a name = "l00114" > < / a > < span class = "lineno" > 114< / span >   < span class = "keyword" > static< / span > < span class = "keywordtype" > bool< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a483ce187d628385d342748315d72f8ab" > WriteStringToFile< / a > (< span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * file_name,< / div >
< div class = "line" > < a name = "l00115" > < / a > < span class = "lineno" > 115< / span >   < span class = "keyword" > const< / span > std::string& contents);< / div >
< div class = "line" > < a name = "l00116" > < / a > < span class = "lineno" > 116< / span >   < / div >
< div class = "line" > < a name = "l00121" > < / a > < span class = "lineno" > 121< / span >   < span class = "keyword" > static< / span > < span class = "keywordtype" > bool< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a4b5280fe058359b5991037f90dde2b77" > WriteFileAtomically< / a > (< span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * file_name,< / div >
< div class = "line" > < a name = "l00122" > < / a > < span class = "lineno" > 122< / span >   < span class = "keyword" > const< / span > std::string& contents);< / div >
< div class = "line" > < a name = "l00123" > < / a > < span class = "lineno" > 123< / span >   < / div >
< div class = "line" > < a name = "l00130" > < / a > < span class = "lineno" > 130< / span >   < span class = "keyword" > static< / span > < span class = "keywordtype" > bool< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#af2cbec5c6dc1c97ada010acd83b9728a" > Copy< / a > (< span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * from_file_name, < span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * to_file_name);< / div >
< div class = "line" > < a name = "l00131" > < / a > < span class = "lineno" > 131< / span >   < / div >
< div class = "line" > < a name = "l00136" > < / a > < span class = "lineno" > 136< / span >   < span class = "keyword" > static< / span > int64_t < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a85633ec9f051eb9f32b07ff7e7740d1c" > CopyFile< / a > (< a class = "code" href = "../../d3/d73/classshaka_1_1File.html" > File< / a > * source, < a class = "code" href = "../../d3/d73/classshaka_1_1File.html" > File< / a > * destination);< / div >
< div class = "line" > < a name = "l00137" > < / a > < span class = "lineno" > 137< / span >   < / div >
< div class = "line" > < a name = "l00143" > < / a > < span class = "lineno" > 143< / span >   < span class = "keyword" > static< / span > int64_t < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a85633ec9f051eb9f32b07ff7e7740d1c" > CopyFile< / a > (< a class = "code" href = "../../d3/d73/classshaka_1_1File.html" > File< / a > * source, < a class = "code" href = "../../d3/d73/classshaka_1_1File.html" > File< / a > * destination, int64_t max_copy);< / div >
< div class = "line" > < a name = "l00144" > < / a > < span class = "lineno" > 144< / span >   < / div >
< div class = "line" > < a name = "l00151" > < / a > < span class = "lineno" > 151< / span >   < span class = "keyword" > static< / span > std::string < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a7a90ebd27f7728a7075cf3ba97396cae" > MakeCallbackFileName< / a > (< / div >
< div class = "line" > < a name = "l00152" > < / a > < span class = "lineno" > 152< / span >   < span class = "keyword" > const< / span > < a class = "code" href = "../../d9/da8/structshaka_1_1BufferCallbackParams.html" > BufferCallbackParams< / a > & callback_params,< / div >
< div class = "line" > < a name = "l00153" > < / a > < span class = "lineno" > 153< / span >   < span class = "keyword" > const< / span > std::string& name);< / div >
< div class = "line" > < a name = "l00154" > < / a > < span class = "lineno" > 154< / span >   < / div >
< div class = "line" > < a name = "l00161" > < / a > < span class = "lineno" > 161< / span >   < span class = "keyword" > static< / span > < span class = "keywordtype" > bool< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#ae87642f9661588e47479721cd101bf7d" > ParseCallbackFileName< / a > (< / div >
< div class = "line" > < a name = "l00162" > < / a > < span class = "lineno" > 162< / span >   < span class = "keyword" > const< / span > std::string& callback_file_name,< / div >
< div class = "line" > < a name = "l00163" > < / a > < span class = "lineno" > 163< / span >   < span class = "keyword" > const< / span > < a class = "code" href = "../../d9/da8/structshaka_1_1BufferCallbackParams.html" > BufferCallbackParams< / a > ** callback_params,< / div >
< div class = "line" > < a name = "l00164" > < / a > < span class = "lineno" > 164< / span >   std::string* name);< / div >
< div class = "line" > < a name = "l00165" > < / a > < span class = "lineno" > 165< / span >   < / div >
< div class = "line" > < a name = "l00166" > < / a > < span class = "lineno" > 166< / span >   < span class = "keyword" > protected< / span > :< / div >
< div class = "line" > < a name = "l00167" > < / a > < span class = "lineno" > 167< / span >   < span class = "keyword" > explicit< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html" > File< / a > (< span class = "keyword" > const< / span > std::string& file_name) : file_name_(file_name) {}< / div >
< div class = "line" > < a name = "l00170" > < / a > < span class = "lineno" > < a class = "line" href = "../../d3/d73/classshaka_1_1File.html#a92d1a67d1560a5290eb36447c50fabf9" > 170< / a > < / span >   < span class = "keyword" > virtual< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a92d1a67d1560a5290eb36447c50fabf9" > ~File< / a > () {}< / div >
< div class = "line" > < a name = "l00171" > < / a > < span class = "lineno" > 171< / span >   < / div >
< div class = "line" > < a name = "l00173" > < / a > < span class = "lineno" > 173< / span >   < span class = "keyword" > virtual< / span > < span class = "keywordtype" > bool< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a68a15f623c2a1601879f291f93a1f464" > Open< / a > () = 0;< / div >
< div class = "line" > < a name = "l00174" > < / a > < span class = "lineno" > 174< / span >   < / div >
< div class = "line" > < a name = "l00175" > < / a > < span class = "lineno" > 175< / span >   < span class = "keyword" > private< / span > :< / div >
< div class = "line" > < a name = "l00176" > < / a > < span class = "lineno" > 176< / span >   < span class = "keyword" > friend< / span > < span class = "keyword" > class < / span > < a class = "code" href = "../../dd/d0c/classshaka_1_1ThreadedIoFile.html" > ThreadedIoFile< / a > ;< / div >
< div class = "line" > < a name = "l00177" > < / a > < span class = "lineno" > 177< / span >   < / div >
< div class = "line" > < a name = "l00178" > < / a > < span class = "lineno" > 178< / span >   < span class = "comment" > // This is a file factory method, it creates a proper file, e.g.< / span > < / div >
< div class = "line" > < a name = "l00179" > < / a > < span class = "lineno" > 179< / span >   < span class = "comment" > // LocalFile, MemFile based on prefix.< / span > < / div >
< div class = "line" > < a name = "l00180" > < / a > < span class = "lineno" > 180< / span >   < span class = "keyword" > static< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html" > File< / a > * Create(< span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * file_name, < span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * mode);< / div >
< div class = "line" > < a name = "l00181" > < / a > < span class = "lineno" > 181< / span >   < / div >
< div class = "line" > < a name = "l00182" > < / a > < span class = "lineno" > 182< / span >   < span class = "keyword" > static< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html" > File< / a > * CreateInternalFile(< span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * file_name, < span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * mode);< / div >
< div class = "line" > < a name = "l00183" > < / a > < span class = "lineno" > 183< / span >   < / div >
< div class = "line" > < a name = "l00184" > < / a > < span class = "lineno" > 184< / span >   < span class = "comment" > // Note that the file type prefix has been stripped off.< / span > < / div >
< div class = "line" > < a name = "l00185" > < / a > < span class = "lineno" > 185< / span >   std::string file_name_;< / div >
< div class = "line" > < a name = "l00186" > < / a > < span class = "lineno" > 186< / span >   < / div >
< div class = "line" > < a name = "l00187" > < / a > < span class = "lineno" > 187< / span >   DISALLOW_COPY_AND_ASSIGN(< a class = "code" href = "../../d3/d73/classshaka_1_1File.html" > File< / a > );< / div >
< div class = "line" > < a name = "l00188" > < / a > < span class = "lineno" > 188< / span >   };< / div >
< div class = "line" > < a name = "l00189" > < / a > < span class = "lineno" > 189< / span >   < / div >
< div class = "line" > < a name = "l00190" > < / a > < span class = "lineno" > 190< / span >   } < span class = "comment" > // namespace shaka< / span > < / div >
< div class = "line" > < a name = "l00191" > < / a > < span class = "lineno" > 191< / span >   < / div >
< div class = "line" > < a name = "l00192" > < / a > < span class = "lineno" > 192< / span >   < span class = "preprocessor" > #endif // PACKAGER_FILE_FILE_H_< / span > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_a8c498531ecbd205fceb0be3478361801" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a8c498531ecbd205fceb0be3478361801" > shaka::File::Write< / a > < / div > < div class = "ttdeci" > virtual int64_t Write(const void *buffer, uint64_t length)=0< / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_a463be34c40e47f95510e991678b34605" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a463be34c40e47f95510e991678b34605" > shaka::File::file_name< / a > < / div > < div class = "ttdeci" > const std::string & file_name() const < / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d2/d4d/file_8h_source.html#l00094" > file.h:94< / a > < / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_a383c9f670511961f334569fd1a7a103b" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a383c9f670511961f334569fd1a7a103b" > shaka::File::Delete< / a > < / div > < div class = "ttdeci" > static bool Delete(const char *file_name)< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d5/dfc/file_8cc_source.html#l00198" > file.cc:198< / a > < / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html" > shaka::File< / a > < / div > < div class = "ttdoc" > Define an abstract file interface. < / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d2/d4d/file_8h_source.html#l00026" > file.h:26< / a > < / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_af2cbec5c6dc1c97ada010acd83b9728a" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#af2cbec5c6dc1c97ada010acd83b9728a" > shaka::File::Copy< / a > < / div > < div class = "ttdeci" > static bool Copy(const char *from_file_name, const char *to_file_name)< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d5/dfc/file_8cc_source.html#l00281" > file.cc:281< / a > < / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_a85633ec9f051eb9f32b07ff7e7740d1c" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a85633ec9f051eb9f32b07ff7e7740d1c" > shaka::File::CopyFile< / a > < / div > < div class = "ttdeci" > static int64_t CopyFile(File *source, File *destination)< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d5/dfc/file_8cc_source.html#l00316" > file.cc:316< / a > < / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_ac9a19cb5fc45664ca440996bf1201c30" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#ac9a19cb5fc45664ca440996bf1201c30" > shaka::File::ReadFileToString< / a > < / div > < div class = "ttdeci" > static bool ReadFileToString(const char *file_name, std::string *contents)< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d5/dfc/file_8cc_source.html#l00216" > file.cc:216< / a > < / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_a6e1ecb2904b609554d332290f20fde0a" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a6e1ecb2904b609554d332290f20fde0a" > shaka::File::Read< / a > < / div > < div class = "ttdeci" > virtual int64_t Read(void *buffer, uint64_t length)=0< / div > < / div >
< div class = "ttc" id = "classshaka_1_1ThreadedIoFile_html" > < div class = "ttname" > < a href = "../../dd/d0c/classshaka_1_1ThreadedIoFile.html" > shaka::ThreadedIoFile< / a > < / div > < div class = "ttdoc" > Declaration of class which implements a thread-safe circular buffer. < / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d2/da6/threaded__io__file_8h_source.html#l00020" > threaded_io_file.h:20< / a > < / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_ac978d5c0585850d4d9948fdf39b33292" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#ac978d5c0585850d4d9948fdf39b33292" > shaka::File::GetFileSize< / a > < / div > < div class = "ttdeci" > static int64_t GetFileSize(const char *file_name)< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d5/dfc/file_8cc_source.html#l00207" > file.cc:207< / a > < / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_a07ae6476e88dab6c0cd9d8c0073b667d" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a07ae6476e88dab6c0cd9d8c0073b667d" > shaka::File::Tell< / a > < / div > < div class = "ttdeci" > virtual bool Tell(uint64_t *position)=0< / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_a932666ed1d6a565bf387a9d8b39a8948" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a932666ed1d6a565bf387a9d8b39a8948" > shaka::File::Close< / a > < / div > < div class = "ttdeci" > virtual bool Close()=0< / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_a5fa625751e03b9e7652ba1bfa98b8ca4" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a5fa625751e03b9e7652ba1bfa98b8ca4" > shaka::File::Flush< / a > < / div > < div class = "ttdeci" > virtual bool Flush()=0< / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_aeb98b64a05f141140e110170bef1bc55" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#aeb98b64a05f141140e110170bef1bc55" > shaka::File::Size< / a > < / div > < div class = "ttdeci" > virtual int64_t Size()=0< / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_a483ce187d628385d342748315d72f8ab" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a483ce187d628385d342748315d72f8ab" > shaka::File::WriteStringToFile< / a > < / div > < div class = "ttdeci" > static bool WriteStringToFile(const char *file_name, const std::string & contents)< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d5/dfc/file_8cc_source.html#l00234" > file.cc:234< / a > < / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_a486bda715b58b1a1863fbfc8d48da62a" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a486bda715b58b1a1863fbfc8d48da62a" > shaka::File::Seek< / a > < / div > < div class = "ttdeci" > virtual bool Seek(uint64_t position)=0< / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_a7a90ebd27f7728a7075cf3ba97396cae" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a7a90ebd27f7728a7075cf3ba97396cae" > shaka::File::MakeCallbackFileName< / a > < / div > < div class = "ttdeci" > static std::string MakeCallbackFileName(const BufferCallbackParams & callback_params, const std::string & name)< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d5/dfc/file_8cc_source.html#l00354" > file.cc:354< / a > < / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_a0a50526352bd6e946c4f33d3e8431b2d" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a0a50526352bd6e946c4f33d3e8431b2d" > shaka::File::OpenWithNoBuffering< / a > < / div > < div class = "ttdeci" > static File * OpenWithNoBuffering(const char *file_name, const char *mode)< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d5/dfc/file_8cc_source.html#l00187" > file.cc:187< / a > < / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_a92d1a67d1560a5290eb36447c50fabf9" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a92d1a67d1560a5290eb36447c50fabf9" > shaka::File::~File< / a > < / div > < div class = "ttdeci" > virtual ~File()< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d2/d4d/file_8h_source.html#l00170" > file.h:170< / a > < / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_a4b5280fe058359b5991037f90dde2b77" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a4b5280fe058359b5991037f90dde2b77" > shaka::File::WriteFileAtomically< / a > < / div > < div class = "ttdeci" > static bool WriteFileAtomically(const char *file_name, const std::string & contents)< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d5/dfc/file_8cc_source.html#l00262" > file.cc:262< / a > < / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_ae87642f9661588e47479721cd101bf7d" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#ae87642f9661588e47479721cd101bf7d" > shaka::File::ParseCallbackFileName< / a > < / div > < div class = "ttdeci" > static bool ParseCallbackFileName(const std::string & callback_file_name, const BufferCallbackParams **callback_params, std::string *name)< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d5/dfc/file_8cc_source.html#l00364" > file.cc:364< / a > < / div > < / div >
< div class = "ttc" id = "classshaka_1_1File_html_a68a15f623c2a1601879f291f93a1f464" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a68a15f623c2a1601879f291f93a1f464" > shaka::File::Open< / a > < / div > < div class = "ttdeci" > virtual bool Open()=0< / div > < div class = "ttdoc" > Internal open. Should not be used directly. < / div > < / div >
< div class = "ttc" id = "structshaka_1_1BufferCallbackParams_html" > < div class = "ttname" > < a href = "../../d9/da8/structshaka_1_1BufferCallbackParams.html" > shaka::BufferCallbackParams< / a > < / div > < div class = "ttdoc" > Buffer callback params. < / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../dc/da3/buffer__callback__params_8h_source.html#l00015" > buffer_callback_params.h:15< / a > < / div > < / div >
< / div > <!-- fragment --> < / div > <!-- contents -->
<!-- start footer part -->
< hr class = "footer" / > < address class = "footer" > < small >
2017-09-20 03:22:56 +00:00
Generated on Tue Sep 19 2017 20:22:03 for Shaka Packager SDK by   < a href = "http://www.doxygen.org/index.html" >
2017-09-20 02:35:05 +00:00
< img class = "footer" src = "../../doxygen.png" alt = "doxygen" / >
< / a > 1.8.6
< / small > < / address >
< / body >
< / html >