Search code examples
pyfilesystem

Is there a way to work with named pipes in PyFileSystem?


Is there a way to create and work with named pipes in PyFileSystem? I don't see a reference to fifo or pipe in the docs.


Solution

  • Not currently. While it would be possible to implement a FS.pipe method, it could only work with a Linux filesystem. It wouldn't be clear what it should do on the other supported filesystems.

    If you want to create a named pipe within an OSFS, you could get the syspath with FS.getsyspath and create the pipe with os.mkfifo.