An anonymous file is just like an array and will have the identical APIs. Just like an array is an anonymous chunk of memory that is freed automatically, anonymous files are chunks of filesystem space that have no name (for the programmer) and are freed automatically. The only difference is that files start out on the filesystem and arrays start out in memory (they can get swapped to filesystem though on memory pressure). This can be useful when we want to temporarily store large amounts of data without putting pressure on memory.
This can be implemented as Streamly.FileSystem.Anonymous module and would have similar APIs as Streamly.Mem.Array.
An anonymous file is just like an array and will have the identical APIs. Just like an array is an anonymous chunk of memory that is freed automatically, anonymous files are chunks of filesystem space that have no name (for the programmer) and are freed automatically. The only difference is that files start out on the filesystem and arrays start out in memory (they can get swapped to filesystem though on memory pressure). This can be useful when we want to temporarily store large amounts of data without putting pressure on memory.
This can be implemented as
Streamly.FileSystem.Anonymous
module and would have similar APIs asStreamly.Mem.Array
.