Skip to content

fs.read error #4443

Closed
Closed
@gentlecolder

Description

@gentlecolder
fs.read(fd, buf, 0, buf.length, stat.size-buf.length-i, function(err, bytesRead, buffer) {
                    if(err) {console.log(err);throw err;}
                           buffer.copy(lastlinebuffer,position, 0,1);
                    position++;
                    if(position>100000)console.log("文件最后行太长超出缓存区");
                    if (buffer[0] === 0x0a) { //0x0a == '\n'


{ [Error: EINVAL, read] errno: -4071, code: 'EINVAL' }
Error: EINVAL, read
    at Error (native)

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to the fs subsystem / file system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions