Skip to content

Make FileSystemException for file in use more real #161

@jacekgajek

Description

@jacekgajek

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions