File.available() v.s. File.size() at position zero in File

ESPfri2
Posts: 9
Joined: Tue May 07, 2019 3:52 pm

File.available() v.s. File.size() at position zero in File

Postby ESPfri2 » 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

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

Who is online

Users browsing this forum: No registered users and 43 guests