Currently, the MemoryFileSystem throws the following exception when there is attempt of deleting a file which is open
if (file.openCount() > 0) {
throw new FileSystemException(abstractPath.toString(), null, "file still open");
}
The "real" message thrown by JVM when underlying system is Unix is:
<path>: Device or resource busy
(or for Windows "The process cannot access the file because it is being used by another process")
It'd be great if Memory File System would throw an exception with a message which matches Unix convention.