How is node v20’s File class intended to be used?

Node v20 officially took the File class out of experimental, but I’m not entirely sure how it was intended to be used.

There doesn’t seem to be any exports in the “fs” module that create File objects. I also couldn’t find references to File objects elsewhere in the docs. There is the fs.openAsBlob(), but I don’t see anything that produces an instance of the File subclass.

The reason that I want to try using this is that Files and Blobs can handle more data than what in-process memory (Buffers) can handle. This is possible, because these classes are just references to the raw data in the file system rather than the raw bytes themselves (Buffers).

The idea is that they can be segmented before being loaded into in-process memory. Additionally, it’s method for segmenting (Blob.slice()) can also be shorter than other methods from fs, since you don’t need to respecify arguments like fd and outbuffer (from fs.read()) every time you want to manipulate the file.

For right now, I’m ok with working with fs.openAsBlob() and Blobs, but being able to work with File objects would help simplify my code as it targets both the browser and node.