public File getFile(String path) {
path = MemoryFolder.trimLeadingAndTrailing( path );
int lastSlashPos = path.lastIndexOf( '/' );
if ( lastSlashPos >= 0 ) {
Folder folder = getFolder( path.substring( 0,
lastSlashPos ) );
String name = path.substring( lastSlashPos + 1 );
return new MemoryFile( this,
name,
folder );
} else {
// path is already at root
Folder folder = getRootFolder();
return new MemoryFile( this,
path,
folder );
}