1 #ifndef MSP_IO_ASSET_H_
2 #define MSP_IO_ASSET_H_
10 Opens a file from the application's assets. On Android, this means the assets
11 contained within the APK. On other platfoms, assets are located in the
12 directory indicated by FS::get_sys_data_dir(). Assets are always read-only.
14 class Asset: public Seekable
19 Private *priv = nullptr;
22 Asset(const std::string &);
25 void set_block(bool) override;
26 void set_inherit(bool) override;
29 std::size_t do_write(const char *, std::size_t) override;
30 std::size_t do_read(char *, std::size_t) override;
33 const Handle &get_handle(Mode) override;
35 SeekOffset seek(SeekOffset, SeekType) override;
36 SeekOffset tell() const override;