Skip to content

Commit

Permalink
♿ (file): Add is_open in interface::File
Browse files Browse the repository at this point in the history
  • Loading branch information
YannLocatelli committed Oct 15, 2021
1 parent b1eefc4 commit ab2c9fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/interface/platform/File.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ struct File {
virtual void rewind() = 0;

virtual auto size() -> size_t = 0;

[[nodiscard]] virtual auto is_open() const -> bool = 0;
};

} // namespace leka::interface
Expand Down
2 changes: 1 addition & 1 deletion libs/FileSystemKit/include/FileSystemKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class FileSystemKit
void rewind() final;
auto size() -> size_t final;

[[nodiscard]] auto is_open() const -> bool;
[[nodiscard]] auto is_open() const -> bool final;

private:
std::unique_ptr<FILE, decltype(&fclose)> _file {nullptr, fclose};
Expand Down

0 comments on commit ab2c9fb

Please sign in to comment.