nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
fileio.hpp
1// toolboxes/io/include/nk/io/file_io/fileio.hpp
2#pragma once
3
4#include <nk/value/span.hpp>
5#include <nk/value/value.hpp>
6
7#include <memory_resource>
8
9namespace nk {
10class FsContext;
11}
12
13namespace nk::io {
14
28
42void fopen(FsContext &fs, Span<const Value> args, size_t nargout, Span<Value> outs, std::pmr::memory_resource *mr);
43
53void fclose(FsContext &fs, Span<const Value> args, size_t nargout, Span<Value> outs, std::pmr::memory_resource *mr);
54
63void fgetl(FsContext &fs, Span<const Value> args, size_t nargout, Span<Value> outs, std::pmr::memory_resource *mr);
64
75void fgets(FsContext &fs, Span<const Value> args, size_t nargout, Span<Value> outs, std::pmr::memory_resource *mr);
76
84void feof(FsContext &fs, Span<const Value> args, size_t nargout, Span<Value> outs, std::pmr::memory_resource *mr);
85
92void ferror(FsContext &fs, Span<const Value> args, size_t nargout, Span<Value> outs, std::pmr::memory_resource *mr);
93
101void ftell(FsContext &fs, Span<const Value> args, size_t nargout, Span<Value> outs, std::pmr::memory_resource *mr);
102
113void fseek(FsContext &fs, Span<const Value> args, size_t nargout, Span<Value> outs, std::pmr::memory_resource *mr);
114
124void frewind(FsContext &fs, Span<const Value> args, size_t nargout, Span<Value> outs, std::pmr::memory_resource *mr);
125
126// ── Binary I/O ───────────────────────────────────────────────────────
127
140void fread(FsContext &fs, Span<const Value> args, size_t nargout, Span<Value> outs, std::pmr::memory_resource *mr);
141
152void fwrite(FsContext &fs, Span<const Value> args, size_t nargout, Span<Value> outs, std::pmr::memory_resource *mr);
153
154} // namespace nk::io