Skip to content

vscode.workspace.fs.stat(): sockets identified as "regular" files. #84524

@ericsnowcurrently

Description

@ericsnowcurrently

VSCode Version: 1.40.0
OS: linux
(working on an extension remotely over SSH; haven't tried local)

If you call vscode.workspace.fs.stat() on a socket "file", the resulting FileStat.type is FileType.File. Isn't that meant to indicate a "regular" file? Instead I would expect a socket to be identified as FileType.Unknown.

To create a socket:

async function createSocket(filename: string): Promise<net.Server> {
    const filename = '/tmp/foo.sock';
    const server = net.createServer();
    await new Promise(resolve => srv.listen(filename, 0, resolve));
    return server;
}

Note that this also applies to vscode.workspace.fs.readDirectory().

@jrieken

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugfile-ioFile I/OverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions