Exemplo n.º 1
0
uint64_t File::position() const
{
    if (!m_fd) {
        throw IOException("position", EINVAL);
    }
    return clc_tell(m_fd);
}
Exemplo n.º 2
0
uint64_t File::seek(int64_t offset, int whence)
{
    if (!m_fd) {
        throw IOException("seek", EINVAL);
    }
    int r = clc_seek(m_fd, offset, whence);
    if (r == -1)
        throw IOException("seek", errno);
    return clc_tell(m_fd);
}
Exemplo n.º 3
0
uint64_t File::seek(int64_t offset, SeekMethod how)
{
    if (!m_fd) {
        throw IOException("seek", EINVAL);
    }
    int r = clc_seek(m_fd, offset, (int)how);
    if (r == -1)
        throw IOException("seek", errno);
    return clc_tell(m_fd);
}