File.available() v.s. File.size() at position zero in File
Posted: Mon May 13, 2019 8:00 am
Hi,
can somebody explain me the reasons for such different types when manipulating Files and not only one : size_t
below, we have : size_t (unsigned int), uint32_t , int
FS.h extract
hence : file.available() = file.size() - file.position()
==> int = unsigned int - unsigned int
can somebody explain me the reasons for such different types when manipulating Files and not only one : size_t
below, we have : size_t (unsigned int), uint32_t , int
FS.h extract
Code: Select all
size_t write(uint8_t) override;
size_t write(const uint8_t *buf, size_t size) override;
int available() override;
int read() override;
int peek() override;
size_t read(uint8_t* buf, size_t size);
size_t readBytes(char *buffer, size_t length)
bool seek(uint32_t pos, SeekMode mode);
size_t position() const;
size_t size() const;
hence : file.available() = file.size() - file.position()
==> int = unsigned int - unsigned int