2021-04-10 04:00:37 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2017-09-20 02:35:05 +00:00
< 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" / >
2021-04-10 04:00:37 +00:00
< meta name = "generator" content = "Doxygen 1.9.1" / >
2018-02-10 23:37:42 +00:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
2017-09-20 02:35:05 +00:00
< 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" / >
2018-02-10 23:37:42 +00:00
< script type = "text/javascript" src = "../../search/searchdata.js" > < / script >
2017-09-20 02:35:05 +00:00
< script type = "text/javascript" src = "../../search/search.js" > < / 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;" >
2018-02-10 23:37:42 +00:00
< td id = "projectalign" style = "padding-left: 0.5em;" >
2017-09-20 02:35:05 +00:00
< div id = "projectname" > Shaka Packager SDK
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
2021-04-10 04:00:37 +00:00
<!-- Generated by Doxygen 1.9.1 -->
2017-09-20 02:35:05 +00:00
< script type = "text/javascript" >
2021-04-10 04:00:37 +00:00
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license-end */
2017-09-20 02:35:05 +00:00
< / script >
2018-02-10 23:37:42 +00:00
< script type = "text/javascript" src = "../../menudata.js" > < / script >
< script type = "text/javascript" src = "../../menu.js" > < / script >
< script type = "text/javascript" >
2021-04-10 04:00:37 +00:00
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
2018-02-10 23:37:42 +00:00
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
2021-04-10 04:00:37 +00:00
/* @license-end */< / script >
2018-02-10 23:37:42 +00:00
< div id = "main-nav" > < / div >
2017-09-20 02:35:05 +00:00
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
2018-02-10 23:37:42 +00:00
< / div >
2017-09-20 02:35:05 +00:00
<!-- 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" >
2021-04-10 04:00:37 +00:00
< 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" > #define PACKAGER_FILE_FILE_H_< / span > < / div >
< div class = "line" > < a name = "l00009" > < / a > < span class = "lineno" > 9< / 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 > < a class = "code" href = "../../d8/daf/namespaceshaka.html" > shaka< / a > {< / 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" > extern< / span > < span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * kHttpFilePrefix;< / div >
< div class = "line" > < a name = "l00024" > < / a > < span class = "lineno" > 24< / span >   < span class = "keyword" > const< / span > int64_t kWholeFile = -1;< / div >
< div class = "line" > < a name = "l00025" > < / a > < span class = "lineno" > 25< / span >   < / div >
< div class = "line" > < a name = "l00027" > < / a > < span class = "lineno" > < a class = "line" href = "../../d3/d73/classshaka_1_1File.html" > 27< / 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 = "l00028" > < / a > < span class = "lineno" > 28< / span >   < span class = "keyword" > public< / span > :< / div >
< div class = "line" > < a name = "l00035" > < / a > < span class = "lineno" > 35< / 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#a4b06e08bb0295cb89fca45f9356ecbae" > file_name< / a > , < span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * mode);< / div >
< div class = "line" > < a name = "l00036" > < / a > < span class = "lineno" > 36< / span >   < / div >
< div class = "line" > < a name = "l00043" > < / a > < span class = "lineno" > 43< / 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 > * < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae" > file_name< / a > , < span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * mode);< / div >
< div class = "line" > < a name = "l00044" > < / a > < span class = "lineno" > 44< / span >   < / div >
< div class = "line" > < a name = "l00048" > < / a > < span class = "lineno" > 48< / 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 > * < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae" > file_name< / a > );< / div >
< div class = "line" > < a name = "l00049" > < / a > < span class = "lineno" > 49< / span >   < / div >
< div class = "line" > < a name = "l00055" > < / a > < span class = "lineno" > < a class = "line" href = "../../d3/d73/classshaka_1_1File.html#a932666ed1d6a565bf387a9d8b39a8948" > 55< / a > < / 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 = "l00056" > < / a > < span class = "lineno" > 56< / span >   < / div >
< div class = "line" > < a name = "l00063" > < / a > < span class = "lineno" > < a class = "line" href = "../../d3/d73/classshaka_1_1File.html#a6e1ecb2904b609554d332290f20fde0a" > 63< / a > < / 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 = "l00064" > < / a > < span class = "lineno" > 64< / span >   < / div >
< div class = "line" > < a name = "l00069" > < / a > < span class = "lineno" > < a class = "line" href = "../../d3/d73/classshaka_1_1File.html#a8c498531ecbd205fceb0be3478361801" > 69< / a > < / 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 = "l00070" > < / a > < span class = "lineno" > 70< / span >   < / div >
< div class = "line" > < a name = "l00073" > < / a > < span class = "lineno" > < a class = "line" href = "../../d3/d73/classshaka_1_1File.html#aeb98b64a05f141140e110170bef1bc55" > 73< / a > < / 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 = "l00074" > < / a > < span class = "lineno" > 74< / span >   < / div >
< div class = "line" > < a name = "l00080" > < / a > < span class = "lineno" > < a class = "line" href = "../../d3/d73/classshaka_1_1File.html#a5fa625751e03b9e7652ba1bfa98b8ca4" > 80< / a > < / 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 = "l00081" > < / a > < span class = "lineno" > 81< / span >   < / div >
< div class = "line" > < a name = "l00085" > < / a > < span class = "lineno" > < a class = "line" href = "../../d3/d73/classshaka_1_1File.html#a486bda715b58b1a1863fbfc8d48da62a" > 85< / a > < / 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 = "l00086" > < / a > < span class = "lineno" > 86< / span >   < / div >
< div class = "line" > < a name = "l00091" > < / a > < span class = "lineno" > < a class = "line" href = "../../d3/d73/classshaka_1_1File.html#a07ae6476e88dab6c0cd9d8c0073b667d" > 91< / a > < / 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 = "l00092" > < / a > < span class = "lineno" > 92< / span >   < / div >
< div class = "line" > < a name = "l00095" > < / a > < span class = "lineno" > < a class = "line" href = "../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae" > 95< / a > < / span >   < span class = "keyword" > const< / span > std::string& < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae" > file_name< / a > ()< span class = "keyword" > const < / span > { < span class = "keywordflow" > return< / span > file_name_; }< / div >
< div class = "line" > < a name = "l00096" > < / a > < span class = "lineno" > 96< / span >   < / div >
< div class = "line" > < a name = "l00097" > < / a > < span class = "lineno" > 97< / span >   < span class = "comment" > // ************************************************************< / span > < / div >
< div class = "line" > < a name = "l00098" > < / a > < span class = "lineno" > 98< / span >   < span class = "comment" > // * Static Methods: File-on-the-filesystem status< / span > < / div >
< div class = "line" > < a name = "l00099" > < / a > < span class = "lineno" > 99< / span >   < span class = "comment" > // ************************************************************< / span > < / div >
< div class = "line" > < a name = "l00100" > < / a > < span class = "lineno" > 100< / span >   < / div >
< div class = "line" > < a name = "l00103" > < / a > < span class = "lineno" > 103< / 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 > * < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae" > file_name< / a > );< / div >
< div class = "line" > < a name = "l00104" > < / a > < span class = "lineno" > 104< / span >   < / div >
< div class = "line" > < a name = "l00109" > < / a > < span class = "lineno" > 109< / 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 > * < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae" > file_name< / a > , std::string* contents);< / div >
< div class = "line" > < a name = "l00110" > < / a > < span class = "lineno" > 110< / span >   < / div >
< div class = "line" > < a name = "l00115" > < / a > < span class = "lineno" > 115< / 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 > * < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae" > file_name< / a > ,< / div >
< div class = "line" > < a name = "l00116" > < / a > < span class = "lineno" > 116< / span >   < span class = "keyword" > const< / span > std::string& contents);< / div >
< div class = "line" > < a name = "l00117" > < / a > < span class = "lineno" > 117< / span >   < / div >
< div class = "line" > < a name = "l00122" > < / a > < span class = "lineno" > 122< / 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 > * < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae" > file_name< / a > ,< / div >
< div class = "line" > < a name = "l00123" > < / a > < span class = "lineno" > 123< / span >   < span class = "keyword" > const< / span > std::string& contents);< / div >
< div class = "line" > < a name = "l00124" > < / a > < span class = "lineno" > 124< / span >   < / div >
< div class = "line" > < a name = "l00131" > < / a > < span class = "lineno" > 131< / 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 = "l00132" > < / a > < span class = "lineno" > 132< / span >   < / div >
< div class = "line" > < a name = "l00137" > < / a > < span class = "lineno" > 137< / 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 = "l00138" > < / a > < span class = "lineno" > 138< / span >   < / div >
< div class = "line" > < a name = "l00144" > < / a > < span class = "lineno" > 144< / 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 = "l00145" > < / a > < span class = "lineno" > 145< / span >   < / div >
< div class = "line" > < a name = "l00148" > < / a > < span class = "lineno" > 148< / span >   < span class = "keyword" > static< / span > < span class = "keywordtype" > bool< / span > < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a8eb71689f5456ba0b1a401c57386caaf" > IsLocalRegularFile< / a > (< span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae" > file_name< / a > );< / div >
< div class = "line" > < a name = "l00149" > < / a > < span class = "lineno" > 149< / span >   < / div >
< div class = "line" > < a name = "l00156" > < / a > < span class = "lineno" > 156< / 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 = "l00157" > < / a > < span class = "lineno" > 157< / 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 = "l00158" > < / a > < span class = "lineno" > 158< / span >   < span class = "keyword" > const< / span > std::string& name);< / div >
< div class = "line" > < a name = "l00159" > < / a > < span class = "lineno" > 159< / span >   < / div >
< div class = "line" > < a name = "l00166" > < / a > < span class = "lineno" > 166< / 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 = "l00167" > < / a > < span class = "lineno" > 167< / span >   < span class = "keyword" > const< / span > std::string& callback_file_name,< / div >
< div class = "line" > < a name = "l00168" > < / a > < span class = "lineno" > 168< / 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 = "l00169" > < / a > < span class = "lineno" > 169< / span >   std::string* name);< / div >
< div class = "line" > < a name = "l00170" > < / a > < span class = "lineno" > 170< / span >   < / div >
< div class = "line" > < a name = "l00171" > < / a > < span class = "lineno" > 171< / span >   < span class = "keyword" > protected< / span > :< / div >
< div class = "line" > < a name = "l00172" > < / a > < span class = "lineno" > 172< / 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& < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae" > file_name< / a > ) : file_name_(< a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae" > file_name< / a > ) {}< / div >
< div class = "line" > < a name = "l00175" > < / a > < span class = "lineno" > < a class = "line" href = "../../d3/d73/classshaka_1_1File.html#a92d1a67d1560a5290eb36447c50fabf9" > 175< / 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 = "l00176" > < / a > < span class = "lineno" > 176< / span >   < / div >
< div class = "line" > < a name = "l00178" > < / a > < span class = "lineno" > < a class = "line" href = "../../d3/d73/classshaka_1_1File.html#a68a15f623c2a1601879f291f93a1f464" > 178< / a > < / 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 = "l00179" > < / a > < span class = "lineno" > 179< / span >   < / div >
< div class = "line" > < a name = "l00180" > < / a > < span class = "lineno" > 180< / span >   < span class = "keyword" > private< / span > :< / div >
< div class = "line" > < a name = "l00181" > < / a > < span class = "lineno" > 181< / 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 = "l00182" > < / a > < span class = "lineno" > 182< / span >   < / div >
< div class = "line" > < a name = "l00183" > < / a > < span class = "lineno" > 183< / span >   < span class = "comment" > // This is a file factory method, it creates a proper file, e.g.< / span > < / div >
< div class = "line" > < a name = "l00184" > < / a > < span class = "lineno" > 184< / span >   < span class = "comment" > // LocalFile, MemFile based on prefix.< / span > < / div >
< div class = "line" > < a name = "l00185" > < / a > < span class = "lineno" > 185< / 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 > * < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae" > file_name< / a > , < span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * mode);< / 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 >   < 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 > * < a class = "code" href = "../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae" > file_name< / a > , < span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > * mode);< / 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 >   < span class = "comment" > // Note that the file type prefix has been stripped off.< / span > < / div >
< div class = "line" > < a name = "l00190" > < / a > < span class = "lineno" > 190< / span >   std::string file_name_;< / 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 >   DISALLOW_COPY_AND_ASSIGN(< a class = "code" href = "../../d3/d73/classshaka_1_1File.html" > File< / a > );< / div >
< div class = "line" > < a name = "l00193" > < / a > < span class = "lineno" > 193< / span >   };< / div >
< div class = "line" > < a name = "l00194" > < / a > < span class = "lineno" > 194< / span >   < / div >
< div class = "line" > < a name = "l00195" > < / a > < span class = "lineno" > 195< / span >   } < span class = "comment" > // namespace shaka< / span > < / div >
< div class = "line" > < a name = "l00196" > < / a > < span class = "lineno" > 196< / span >   < / div >
< div class = "line" > < a name = "l00197" > < / a > < span class = "lineno" > 197< / span >   < span class = "preprocessor" > #endif < / span > < span class = "comment" > // PACKAGER_FILE_FILE_H_< / span > < / div >
< div class = "ttc" id = "aclassshaka_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#l00027" > file.h:27< / a > < / div > < / div >
< div class = "ttc" id = "aclassshaka_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 = "aclassshaka_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#l00201" > file.cc:201< / a > < / div > < / div >
< div class = "ttc" id = "aclassshaka_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#l00212" > file.cc:212< / a > < / div > < / div >
< div class = "ttc" id = "aclassshaka_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#l00248" > file.cc:248< / a > < / div > < / div >
< div class = "ttc" id = "aclassshaka_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 = "aclassshaka_1_1File_html_a4b06e08bb0295cb89fca45f9356ecbae" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae" > 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#l00095" > file.h:95< / a > < / div > < / div >
< div class = "ttc" id = "aclassshaka_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#l00277" > file.cc:277< / a > < / div > < / div >
< div class = "ttc" id = "aclassshaka_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 = "aclassshaka_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 = "aclassshaka_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 >
2021-06-11 04:44:53 +00:00
< div class = "ttc" id = "aclassshaka_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#l00402" > file.cc:402< / a > < / div > < / div >
< div class = "ttc" id = "aclassshaka_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#l00336" > file.cc:336< / a > < / div > < / div >
2021-04-10 04:00:37 +00:00
< div class = "ttc" id = "aclassshaka_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 >
2021-06-11 04:44:53 +00:00
< div class = "ttc" id = "aclassshaka_1_1File_html_a8eb71689f5456ba0b1a401c57386caaf" > < div class = "ttname" > < a href = "../../d3/d73/classshaka_1_1File.html#a8eb71689f5456ba0b1a401c57386caaf" > shaka::File::IsLocalRegularFile< / a > < / div > < div class = "ttdeci" > static bool IsLocalRegularFile(const char *file_name)< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d5/dfc/file_8cc_source.html#l00377" > file.cc:377< / a > < / div > < / div >
2021-04-10 04:00:37 +00:00
< div class = "ttc" id = "aclassshaka_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#l00175" > file.h:175< / a > < / div > < / div >
< div class = "ttc" id = "aclassshaka_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 = "aclassshaka_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#l00221" > file.cc:221< / a > < / div > < / div >
< div class = "ttc" id = "aclassshaka_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#l00230" > file.cc:230< / a > < / div > < / div >
2021-06-11 04:44:53 +00:00
< div class = "ttc" id = "aclassshaka_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#l00412" > file.cc:412< / a > < / div > < / div >
2021-04-10 04:00:37 +00:00
< div class = "ttc" id = "aclassshaka_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 >
2021-06-11 04:44:53 +00:00
< div class = "ttc" id = "aclassshaka_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#l00300" > file.cc:300< / a > < / div > < / div >
2021-04-10 04:00:37 +00:00
< div class = "ttc" id = "aclassshaka_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 = "anamespaceshaka_html" > < div class = "ttname" > < a href = "../../d8/daf/namespaceshaka.html" > shaka< / a > < / div > < div class = "ttdoc" > All the methods that are virtual are virtual for mocking.< / div > < div class = "ttdef" > < b > Definition:< / b > < a href = "../../d4/d15/gflags__hex__bytes_8cc_source.html#l00011" > gflags_hex_bytes.cc:11< / a > < / div > < / div >
< div class = "ttc" id = "astructshaka_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 >
2017-09-20 02:35:05 +00:00
< / div > <!-- fragment --> < / div > <!-- contents -->
<!-- start footer part -->
< hr class = "footer" / > < address class = "footer" > < small >
2021-06-11 04:44:53 +00:00
Generated on Thu Jun 10 2021 21:44:25 for Shaka Packager SDK by  < a href = "https://www.doxygen.org/index.html" > < img class = "footer" src = "../../doxygen.svg" width = "104" height = "31" alt = "doxygen" / > < / a > 1.9.1
2017-09-20 02:35:05 +00:00
< / small > < / address >
< / body >
< / html >