commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin van den Bemt <mll...@mvdb.net>
Subject Re: [vfs] How to properly clear VFS Ram filesystem
Date Wed, 24 Dec 2014 16:45:23 GMT
FileSystemManager manager = VFS.getManager();
FileObject root = manager.resolveFile("ram:/");
manager.closeFileSystem(root.getFileSystem());

should do the trick.



Mvgr,
Martin

2014-12-24 11:29 GMT+01:00 Arbi Akhina <arbi.akhina@gmail.com>:
> Hi, I'm using VFS2 to construct an in-memory filesystem (uring the ram scheme)
> for tests. After each test I've to clean up (destroy all created files and
> folders), I'm using the following command:
>
> VFS.getManager().getFilesCache().close();
>
> However this doesn't seem to clear everything! what's the proper way to do
> it?
>
> question on stackoverflow
> <http://stackoverflow.com/questions/27619994/how-to-properly-clear-vfs-ram-filesystem>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message