Currently, the mkstream command creates a json file with the stream source and type. The mount.stream command then reads the json file and creates a custom stream implementation according to the type field.
New proposed implementation:
Create a new built-in named stream entry type in jsfs.
mkstream creates entries of this new type
mount.stream merely opens the named stream entry, pass it to a new StubFileSystem instance and mounts that instance to a file system in the file system manager.
Note we have to define the behavior of these new named stream entries
Only supported in jsfs
Show a special entries in ls
Reading from a stream (e.g. cat) would provide the data from the stream peer
Currently, the
mkstream
command creates a json file with the stream source and type. The mount.stream command then reads the json file and creates a custom stream implementation according to thetype
field.New proposed implementation:
named stream
entry type in jsfs.mkstream
creates entries of this new typemount.stream
merely opens thenamed stream
entry, pass it to a newStubFileSystem
instance and mounts that instance to a file system in the file system manager.Note we have to define the behavior of these new
named stream
entriesls
cat
) would provide the data from the stream peer