GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — RTNode-HeltecV4/FileStream.h at main · jrl290/RTNode-HeltecV4

Expand file tree

/

FileStream.h

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
35 lines (25 loc) · 979 Bytes
/

FileStream.h

Copy path

File metadata and controls

executable file
·
35 lines (25 loc) · 979 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once
#ifdef HAS_RNS
#include "FileSystem.h"
#include "FileSystemType.h"
class FileStream : public RNS::FileStreamImpl {
private:
std::unique_ptr<File> _file;
bool _closed = false;
public:
FileStream(File* file) : RNS::FileStreamImpl(), _file(file) {}
virtual ~FileStream() { if (!_closed) close(); }
public:
inline virtual const char* name() { return _file->name(); }
inline virtual size_t size() { return _file->size(); }
inline virtual void close() { _closed = true; _file->close(); }
// Print overrides
inline virtual size_t write(uint8_t byte) { return _file->write(byte); }
inline virtual size_t write(const uint8_t *buffer, size_t size) { return _file->write(buffer, size); }
// Stream overrides
inline virtual int available() { return _file->available(); }
inline virtual int read() { return _file->read(); }
inline virtual int peek() { return _file->peek(); }
inline virtual void flush() { _file->flush(); }
};
#endif
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.