Neil, thanks for suggestion, less work and much tidier code than my original fall back thoughts.  Implemention done and passing the unit tests!

Richard

On 19/09/2019 15:25, Neil C Smith wrote:
On Thu, 19 Sep 2019 at 15:04, Richard Linsdale
<rich...@theretiredprogrammer.uk> wrote:
Any suggestions welcome, as I want to avoid copying the existing file
content to a new file on every append request and then renaming the file
(which is my probably short term fall back).
The MemoryFileSystem is quite simple, and everything is backed by a
byte[].  What about reading the existing contents with asBytes() and
then writing that into the output stream?  Not much different mind
you!

In the longer-term, it would be nice to have
<FileObject>.getOutputStream(boolean append) as a extension to the API,
but that can come later.
Does it have to be a NetBeans filesystem?  I've seen some NIO2 memory
file systems which have this feature (although are probably doing just
the same thing under the hood).

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to