171 lines
8.9 KiB
TeX
171 lines
8.9 KiB
TeX
\hypertarget{classGpgFrontend_1_1FileOperator}{}\doxysection{Gpg\+Frontend\+::File\+Operator Class Reference}
|
|
\label{classGpgFrontend_1_1FileOperator}\index{GpgFrontend::FileOperator@{GpgFrontend::FileOperator}}
|
|
|
|
|
|
provides file operations
|
|
|
|
|
|
|
|
|
|
{\ttfamily \#include $<$File\+Operator.\+h$>$}
|
|
|
|
|
|
|
|
Collaboration diagram for Gpg\+Frontend\+::File\+Operator\+:
|
|
\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=225pt]{classGpgFrontend_1_1FileOperator__coll__graph}
|
|
\end{center}
|
|
\end{figure}
|
|
\doxysubsection*{Static Public Member Functions}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
static bool \mbox{\hyperlink{classGpgFrontend_1_1FileOperator_ad4424bce4f22ae75a16c542dfb4ddf0a}{Read\+File\+Std}} (const std\+::filesystem\+::path \&file\+\_\+name, std\+::string \&data)
|
|
\begin{DoxyCompactList}\small\item\em read file content using std struct \end{DoxyCompactList}\item
|
|
static bool \mbox{\hyperlink{classGpgFrontend_1_1FileOperator_a51121c94dc32a83d7073fbe7138b603b}{Write\+File\+Std}} (const std\+::filesystem\+::path \&file\+\_\+name, const std\+::string \&data)
|
|
\begin{DoxyCompactList}\small\item\em write file content using std struct \end{DoxyCompactList}\item
|
|
static bool \mbox{\hyperlink{classGpgFrontend_1_1FileOperator_a28a3572dc01192b6a4d50b544181084c}{Read\+File}} (const QString \&file\+\_\+name, QByte\+Array \&data)
|
|
\begin{DoxyCompactList}\small\item\em read file content \end{DoxyCompactList}\item
|
|
static bool \mbox{\hyperlink{classGpgFrontend_1_1FileOperator_a2f21ef4a88448b1eddf756302913d338}{Write\+File}} (const QString \&file\+\_\+name, const QByte\+Array \&data)
|
|
\begin{DoxyCompactList}\small\item\em write file content \end{DoxyCompactList}\item
|
|
static std\+::string \mbox{\hyperlink{classGpgFrontend_1_1FileOperator_a08baef750a723ee709804120a34d19c9}{Calculate\+Hash}} (const std\+::filesystem\+::path \&file\+\_\+path)
|
|
\end{DoxyCompactItemize}
|
|
|
|
|
|
\doxysubsection{Detailed Description}
|
|
provides file operations
|
|
|
|
\doxysubsection{Member Function Documentation}
|
|
\mbox{\Hypertarget{classGpgFrontend_1_1FileOperator_a08baef750a723ee709804120a34d19c9}\label{classGpgFrontend_1_1FileOperator_a08baef750a723ee709804120a34d19c9}}
|
|
\index{GpgFrontend::FileOperator@{GpgFrontend::FileOperator}!CalculateHash@{CalculateHash}}
|
|
\index{CalculateHash@{CalculateHash}!GpgFrontend::FileOperator@{GpgFrontend::FileOperator}}
|
|
\doxysubsubsection{\texorpdfstring{CalculateHash()}{CalculateHash()}}
|
|
{\footnotesize\ttfamily std\+::string Gpg\+Frontend\+::\+File\+Operator\+::\+Calculate\+Hash (\begin{DoxyParamCaption}\item[{const std\+::filesystem\+::path \&}]{file\+\_\+path }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
|
|
|
|
calculate the hash of a file
|
|
\begin{DoxyParams}{Parameters}
|
|
{\em file\+\_\+path} & \\
|
|
\hline
|
|
\end{DoxyParams}
|
|
\begin{DoxyReturn}{Returns}
|
|
|
|
\end{DoxyReturn}
|
|
\mbox{\Hypertarget{classGpgFrontend_1_1FileOperator_a28a3572dc01192b6a4d50b544181084c}\label{classGpgFrontend_1_1FileOperator_a28a3572dc01192b6a4d50b544181084c}}
|
|
\index{GpgFrontend::FileOperator@{GpgFrontend::FileOperator}!ReadFile@{ReadFile}}
|
|
\index{ReadFile@{ReadFile}!GpgFrontend::FileOperator@{GpgFrontend::FileOperator}}
|
|
\doxysubsubsection{\texorpdfstring{ReadFile()}{ReadFile()}}
|
|
{\footnotesize\ttfamily bool Gpg\+Frontend\+::\+File\+Operator\+::\+Read\+File (\begin{DoxyParamCaption}\item[{const QString \&}]{file\+\_\+name, }\item[{QByte\+Array \&}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
|
|
|
|
|
|
|
|
read file content
|
|
|
|
|
|
\begin{DoxyParams}{Parameters}
|
|
{\em file\+\_\+name} & file name \\
|
|
\hline
|
|
{\em data} & data read from file \\
|
|
\hline
|
|
\end{DoxyParams}
|
|
\begin{DoxyReturn}{Returns}
|
|
true if success
|
|
|
|
false if failed
|
|
\end{DoxyReturn}
|
|
Copyright (C) 2021 Saturneric
|
|
|
|
This file is part of \mbox{\hyperlink{namespaceGpgFrontend}{Gpg\+Frontend}}.
|
|
|
|
\mbox{\hyperlink{namespaceGpgFrontend}{Gpg\+Frontend}} is free software\+: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
\mbox{\hyperlink{namespaceGpgFrontend}{Gpg\+Frontend}} is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License along with \mbox{\hyperlink{namespaceGpgFrontend}{Gpg\+Frontend}}. If not, see \href{https://www.gnu.org/licenses/}{\texttt{ https\+://www.\+gnu.\+org/licenses/}}.
|
|
|
|
The initial version of the source code is inherited from the gpg4usb project, which is under GPL-\/3.\+0-\/or-\/later.
|
|
|
|
All the source code of \mbox{\hyperlink{namespaceGpgFrontend}{Gpg\+Frontend}} was modified and released by Saturneric\href{mailto:eric@bktus.com}{\texttt{ eric@bktus.\+com}} starting on May 12, 2021.
|
|
|
|
SPDX-\/\+License-\/\+Identifier\+: GPL-\/3.\+0-\/or-\/later
|
|
|
|
Referenced by Gpg\+Frontend\+::\+UI\+::\+Common\+Utils\+::\+Slot\+Import\+Key\+From\+File().
|
|
|
|
\mbox{\Hypertarget{classGpgFrontend_1_1FileOperator_ad4424bce4f22ae75a16c542dfb4ddf0a}\label{classGpgFrontend_1_1FileOperator_ad4424bce4f22ae75a16c542dfb4ddf0a}}
|
|
\index{GpgFrontend::FileOperator@{GpgFrontend::FileOperator}!ReadFileStd@{ReadFileStd}}
|
|
\index{ReadFileStd@{ReadFileStd}!GpgFrontend::FileOperator@{GpgFrontend::FileOperator}}
|
|
\doxysubsubsection{\texorpdfstring{ReadFileStd()}{ReadFileStd()}}
|
|
{\footnotesize\ttfamily bool Gpg\+Frontend\+::\+File\+Operator\+::\+Read\+File\+Std (\begin{DoxyParamCaption}\item[{const std\+::filesystem\+::path \&}]{file\+\_\+name, }\item[{std\+::string \&}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
|
|
|
|
|
|
|
|
read file content using std struct
|
|
|
|
|
|
\begin{DoxyParams}{Parameters}
|
|
{\em file\+\_\+name} & file name \\
|
|
\hline
|
|
{\em data} & data read from file \\
|
|
\hline
|
|
\end{DoxyParams}
|
|
\begin{DoxyReturn}{Returns}
|
|
|
|
\end{DoxyReturn}
|
|
|
|
|
|
Referenced by Gpg\+Frontend\+::\+Data\+Object\+Operator\+::\+Data\+Object\+Operator(), Gpg\+Frontend\+::\+Gpg\+File\+Opera\+::\+Decrypt\+File(), Gpg\+Frontend\+::\+Gpg\+File\+Opera\+::\+Decrypt\+Verify\+File(), Gpg\+Frontend\+::\+Gpg\+File\+Opera\+::\+Encrypt\+File(), Gpg\+Frontend\+::\+Gpg\+File\+Opera\+::\+Encrypt\+File\+Symmetric(), Gpg\+Frontend\+::\+Gpg\+File\+Opera\+::\+Encrypt\+Sign\+File(), Gpg\+Frontend\+::\+Key\+Package\+Operator\+::\+Import\+Key\+Package(), Gpg\+Frontend\+::\+Gpg\+File\+Opera\+::\+Sign\+File(), and Gpg\+Frontend\+::\+Gpg\+File\+Opera\+::\+Verify\+File().
|
|
|
|
\mbox{\Hypertarget{classGpgFrontend_1_1FileOperator_a2f21ef4a88448b1eddf756302913d338}\label{classGpgFrontend_1_1FileOperator_a2f21ef4a88448b1eddf756302913d338}}
|
|
\index{GpgFrontend::FileOperator@{GpgFrontend::FileOperator}!WriteFile@{WriteFile}}
|
|
\index{WriteFile@{WriteFile}!GpgFrontend::FileOperator@{GpgFrontend::FileOperator}}
|
|
\doxysubsubsection{\texorpdfstring{WriteFile()}{WriteFile()}}
|
|
{\footnotesize\ttfamily bool Gpg\+Frontend\+::\+File\+Operator\+::\+Write\+File (\begin{DoxyParamCaption}\item[{const QString \&}]{file\+\_\+name, }\item[{const QByte\+Array \&}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
|
|
|
|
|
|
|
|
write file content
|
|
|
|
|
|
\begin{DoxyParams}{Parameters}
|
|
{\em file\+\_\+name} & file name \\
|
|
\hline
|
|
{\em data} & data to write to file \\
|
|
\hline
|
|
\end{DoxyParams}
|
|
\begin{DoxyReturn}{Returns}
|
|
true if success
|
|
|
|
false if failed
|
|
\end{DoxyReturn}
|
|
\mbox{\Hypertarget{classGpgFrontend_1_1FileOperator_a51121c94dc32a83d7073fbe7138b603b}\label{classGpgFrontend_1_1FileOperator_a51121c94dc32a83d7073fbe7138b603b}}
|
|
\index{GpgFrontend::FileOperator@{GpgFrontend::FileOperator}!WriteFileStd@{WriteFileStd}}
|
|
\index{WriteFileStd@{WriteFileStd}!GpgFrontend::FileOperator@{GpgFrontend::FileOperator}}
|
|
\doxysubsubsection{\texorpdfstring{WriteFileStd()}{WriteFileStd()}}
|
|
{\footnotesize\ttfamily bool Gpg\+Frontend\+::\+File\+Operator\+::\+Write\+File\+Std (\begin{DoxyParamCaption}\item[{const std\+::filesystem\+::path \&}]{file\+\_\+name, }\item[{const std\+::string \&}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}
|
|
|
|
|
|
|
|
write file content using std struct
|
|
|
|
|
|
\begin{DoxyParams}{Parameters}
|
|
{\em file\+\_\+name} & file name \\
|
|
\hline
|
|
{\em data} & data to write to file \\
|
|
\hline
|
|
\end{DoxyParams}
|
|
\begin{DoxyReturn}{Returns}
|
|
|
|
\end{DoxyReturn}
|
|
|
|
|
|
Referenced by Gpg\+Frontend\+::\+Gpg\+File\+Opera\+::\+Decrypt\+File(), Gpg\+Frontend\+::\+Gpg\+File\+Opera\+::\+Decrypt\+Verify\+File(), Gpg\+Frontend\+::\+Gpg\+File\+Opera\+::\+Encrypt\+File(), Gpg\+Frontend\+::\+Gpg\+File\+Opera\+::\+Encrypt\+File\+Symmetric(), Gpg\+Frontend\+::\+Gpg\+File\+Opera\+::\+Encrypt\+Sign\+File(), Gpg\+Frontend\+::\+Key\+Package\+Operator\+::\+Generate\+Key\+Package(), Gpg\+Frontend\+::\+Key\+Package\+Operator\+::\+Generate\+Passphrase(), Gpg\+Frontend\+::\+Data\+Object\+Operator\+::init\+\_\+app\+\_\+secure\+\_\+key(), and Gpg\+Frontend\+::\+Gpg\+File\+Opera\+::\+Sign\+File().
|
|
|
|
|
|
|
|
The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
|
|
\item
|
|
src/core/function/File\+Operator.\+h\item
|
|
src/core/function/File\+Operator.\+cpp\end{DoxyCompactItemize}
|