AsyncFw
1.2
Async Framework is c++ runtime with timers, poll notifiers, sockets, coroutines, etc.
Loading...
Searching...
No Matches
File.h
1
/*
2
Copyright (c) 2026 Alexandr Kuzmuk
3
4
This file is part of the AsyncFw project. Licensed under the MIT License.
5
See {Link: LICENSE file https://mit-license.org} in the project root for full license information.
6
*/
7
8
#pragma once
9
10
#include <ios>
11
#include <cstdint>
12
13
namespace
AsyncFw {
14
class
DataArray
;
16
class
File {
17
struct
Private;
18
19
public
:
20
File(
const
std::string & = {});
21
~File();
22
bool
open(
const
std::string &, std::ios::openmode = std::ios::binary | std::ios::in);
23
bool
open(std::ios::openmode = std::ios::binary | std::ios::in);
24
void
close();
25
void
flush();
26
void
remove();
27
std::size_t size();
28
bool
exists();
29
DataArray
read(std::size_t = SIZE_MAX);
30
std::streamsize write(
const
DataArray
&);
31
std::streamsize read(
char
*, std::streamsize);
32
std::streamsize write(
const
char
*, std::streamsize);
33
std::string readLine();
34
bool
fail();
35
36
std::fstream &fstream();
37
38
private
:
39
File(File &) =
delete
;
40
File &operator=(File &) =
delete
;
41
Private *private_;
42
};
43
}
// namespace AsyncFw
AsyncFw::DataArray
The DataArray class.
Definition
DataArray.h:20
main
File.h
Generated by
1.13.2