assertObjectBelongsToStore( directory );
assertDirectoryExistsInStore( directory );
if ( !recursive && !directory.isEmpty( ) )
{
throw new DirectoryIsNotEmptyException(
"Cannot remove directory '"
+ directory.getPath( ).getAbsolutePath( )
+ "' because it is not empty and the recursive option is not set." );
}