Skip to content

Commit

Permalink
streams: reorder/document functions
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa committed Sep 19, 2024
1 parent 67a3d59 commit caac06f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/streams.h
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,18 @@ class AutoFile
/** Implementation detail, only used internally. */
std::size_t detail_fread(Span<std::byte> dst);

/** Wrapper around fseek(). Will throw if seeking is not possible. */
void seek(int64_t offset, int origin);

/** Find position within the file. Will throw if unknown. */
int64_t tell();

/** Wrapper around FileCommit(). */
bool Commit();

/** Wrapper around TruncateFile(). */
bool Truncate(unsigned size);

//
// Stream subset
//
Expand All @@ -453,9 +462,6 @@ class AutoFile
::Unserialize(*this, obj);
return *this;
}

bool Commit();
bool Truncate(unsigned size);
};

/** Wrapper around an AutoFile& that implements a ring buffer to
Expand Down

0 comments on commit caac06f

Please sign in to comment.