GpgFrontend-Doxygen/docs/html/IOUtils_8h_source.html

150 lines
14 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GpgFrontend Project: src/core/utils/IOUtils.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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<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;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">GpgFrontend Project
</div>
<div id="projectbrief">A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('IOUtils_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">IOUtils.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;core/model/GFBuffer.h&quot;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceGpgFrontend.html">GpgFrontend</a> {</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; </div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="keyword">auto</span> GPGFRONTEND_CORE_EXPORT <a class="code" href="namespaceGpgFrontend.html#a316a209be1a4c403426c77b029e319fc">ReadFileGFBuffer</a>(<span class="keyword">const</span> QString &amp;file_name)</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; -&gt; std::tuple&lt;bool, GFBuffer&gt;;</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; </div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;<span class="keyword">auto</span> GPGFRONTEND_CORE_EXPORT <a class="code" href="namespaceGpgFrontend.html#a4df3f25e93d16e2dc60c7d680c22dcb9">WriteFileGFBuffer</a>(<span class="keyword">const</span> QString &amp;file_name,</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; GFBuffer data) -&gt; bool;</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; </div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;<span class="keyword">auto</span> GPGFRONTEND_CORE_EXPORT <a class="code" href="namespaceGpgFrontend.html#a253c30d60238c5c0ed1545d0c7bf31de">ReadFile</a>(<span class="keyword">const</span> QString &amp;file_name,</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; QByteArray &amp;data) -&gt; bool;</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;<span class="keyword">auto</span> GPGFRONTEND_CORE_EXPORT <a class="code" href="namespaceGpgFrontend.html#acc93a10f79f6479f72940fba39b780e1">WriteFile</a>(<span class="keyword">const</span> QString &amp;file_name,</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <span class="keyword">const</span> QByteArray &amp;data) -&gt; bool;</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; </div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="keyword">auto</span> GPGFRONTEND_CORE_EXPORT <a class="code" href="namespaceGpgFrontend.html#af395fb120a603d913ac040372ee5c651">CalculateHash</a>(<span class="keyword">const</span> QString &amp;file_path) -&gt; QString;</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="namespaceGpgFrontend.html#a4e780b0a2bddd1ce8735d3fa36dbfa86"> 92</a></span>&#160;<span class="keyword">auto</span> GPGFRONTEND_CORE_EXPORT <a class="code" href="namespaceGpgFrontend.html#a4e780b0a2bddd1ce8735d3fa36dbfa86">WriteBufferToFile</a>(<span class="keyword">const</span> QString &amp;path,</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keyword">const</span> QString &amp;out_buffer)</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; -&gt; bool;</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; </div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;<span class="keyword">auto</span> GPGFRONTEND_CORE_EXPORT <a class="code" href="namespaceGpgFrontend.html#a3d15fda681fcdd6ea07a8eb31f81b249">GetTempFilePath</a>() -&gt; QString;</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;<span class="keyword">auto</span> GPGFRONTEND_CORE_EXPORT <a class="code" href="namespaceGpgFrontend.html#aa8c5cb4cb2c9421dc8f754d3652c5313">CreateTempFileAndWriteData</a>(<span class="keyword">const</span> QString &amp;data)</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; -&gt; QString;</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;<span class="keyword">auto</span> GPGFRONTEND_CORE_EXPORT <a class="code" href="namespaceGpgFrontend.html#aa8c5cb4cb2c9421dc8f754d3652c5313">CreateTempFileAndWriteData</a>(<span class="keyword">const</span> <a class="code" href="classGpgFrontend_1_1GFBuffer.html">GFBuffer</a> &amp;data)</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; -&gt; QString;</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="keyword">auto</span> GPGFRONTEND_CORE_EXPORT <a class="code" href="namespaceGpgFrontend.html#a730cce728b43f040f6b0cb2823146a06">TargetFilePreCheck</a>(<span class="keyword">const</span> QString &amp;path, <span class="keywordtype">bool</span> read)</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; -&gt; std::tuple&lt;bool, QString&gt;;</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; </div>
<div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="namespaceGpgFrontend.html#ac855ff975b7f2571f5dab25c857e5a4f"> 137</a></span>&#160;<span class="keyword">auto</span> GPGFRONTEND_CORE_EXPORT GetFullExtension(QString path) -&gt; QString;</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;} <span class="comment">// namespace GpgFrontend</span></div>
<div class="ttc" id="aclassGpgFrontend_1_1GFBuffer_html"><div class="ttname"><a href="classGpgFrontend_1_1GFBuffer.html">GpgFrontend::GFBuffer</a></div><div class="ttdef"><b>Definition:</b> GFBuffer.h:36</div></div>
<div class="ttc" id="anamespaceGpgFrontend_html"><div class="ttname"><a href="namespaceGpgFrontend.html">GpgFrontend</a></div><div class="ttdef"><b>Definition:</b> app.cpp:39</div></div>
<div class="ttc" id="anamespaceGpgFrontend_html_a253c30d60238c5c0ed1545d0c7bf31de"><div class="ttname"><a href="namespaceGpgFrontend.html#a253c30d60238c5c0ed1545d0c7bf31de">GpgFrontend::ReadFile</a></div><div class="ttdeci">auto ReadFile(const QString &amp;file_name, QByteArray &amp;data) -&gt; bool</div><div class="ttdoc">read file content</div><div class="ttdef"><b>Definition:</b> IOUtils.cpp:49</div></div>
<div class="ttc" id="anamespaceGpgFrontend_html_a316a209be1a4c403426c77b029e319fc"><div class="ttname"><a href="namespaceGpgFrontend.html#a316a209be1a4c403426c77b029e319fc">GpgFrontend::ReadFileGFBuffer</a></div><div class="ttdeci">auto ReadFileGFBuffer(const QString &amp;file_name) -&gt; std::tuple&lt; bool, GFBuffer &gt;</div><div class="ttdef"><b>Definition:</b> IOUtils.cpp:71</div></div>
<div class="ttc" id="anamespaceGpgFrontend_html_a3d15fda681fcdd6ea07a8eb31f81b249"><div class="ttname"><a href="namespaceGpgFrontend.html#a3d15fda681fcdd6ea07a8eb31f81b249">GpgFrontend::GetTempFilePath</a></div><div class="ttdeci">auto GetTempFilePath() -&gt; QString</div><div class="ttdef"><b>Definition:</b> IOUtils.cpp:132</div></div>
<div class="ttc" id="anamespaceGpgFrontend_html_a4df3f25e93d16e2dc60c7d680c22dcb9"><div class="ttname"><a href="namespaceGpgFrontend.html#a4df3f25e93d16e2dc60c7d680c22dcb9">GpgFrontend::WriteFileGFBuffer</a></div><div class="ttdeci">auto WriteFileGFBuffer(const QString &amp;file_name, GFBuffer data) -&gt; bool</div><div class="ttdef"><b>Definition:</b> IOUtils.cpp:78</div></div>
<div class="ttc" id="anamespaceGpgFrontend_html_a4e780b0a2bddd1ce8735d3fa36dbfa86"><div class="ttname"><a href="namespaceGpgFrontend.html#a4e780b0a2bddd1ce8735d3fa36dbfa86">GpgFrontend::WriteBufferToFile</a></div><div class="ttdeci">auto GPGFRONTEND_CORE_EXPORT WriteBufferToFile(const QString &amp;path, const QString &amp;out_buffer) -&gt; bool</div></div>
<div class="ttc" id="anamespaceGpgFrontend_html_a730cce728b43f040f6b0cb2823146a06"><div class="ttname"><a href="namespaceGpgFrontend.html#a730cce728b43f040f6b0cb2823146a06">GpgFrontend::TargetFilePreCheck</a></div><div class="ttdeci">auto TargetFilePreCheck(const QString &amp;path, bool read) -&gt; std::tuple&lt; bool, QString &gt;</div><div class="ttdef"><b>Definition:</b> IOUtils.cpp:150</div></div>
<div class="ttc" id="anamespaceGpgFrontend_html_aa8c5cb4cb2c9421dc8f754d3652c5313"><div class="ttname"><a href="namespaceGpgFrontend.html#aa8c5cb4cb2c9421dc8f754d3652c5313">GpgFrontend::CreateTempFileAndWriteData</a></div><div class="ttdeci">auto CreateTempFileAndWriteData(const QString &amp;data) -&gt; QString</div><div class="ttdef"><b>Definition:</b> IOUtils.cpp:138</div></div>
<div class="ttc" id="anamespaceGpgFrontend_html_acc93a10f79f6479f72940fba39b780e1"><div class="ttname"><a href="namespaceGpgFrontend.html#acc93a10f79f6479f72940fba39b780e1">GpgFrontend::WriteFile</a></div><div class="ttdeci">auto WriteFile(const QString &amp;file_name, const QByteArray &amp;data) -&gt; bool</div><div class="ttdoc">write file content</div><div class="ttdef"><b>Definition:</b> IOUtils.cpp:60</div></div>
<div class="ttc" id="anamespaceGpgFrontend_html_af395fb120a603d913ac040372ee5c651"><div class="ttname"><a href="namespaceGpgFrontend.html#af395fb120a603d913ac040372ee5c651">GpgFrontend::CalculateHash</a></div><div class="ttdeci">auto CalculateHash(const QString &amp;file_path) -&gt; QString</div><div class="ttdef"><b>Definition:</b> IOUtils.cpp:82</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_aebb8dcc11953d78e620bbef0b9e2183.html">core</a></li><li class="navelem"><a class="el" href="dir_a8053b3d69cfefb2b2e6ec7bf9dd5c1a.html">utils</a></li><li class="navelem"><b>IOUtils.h</b></li>
<li class="footer">Generated 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 </li>
</ul>
</div>
</body>
</html>