@Consumes( { APPLICATION_XML, APPLICATION_JSON } )
public void deleteFile( @FormParam( MethodParams.PATH ) @DefaultValue( "" ) String path,
@Context HttpServletResponse response ) throws IOException {
IResourceLoader loader = getResourceLoader( path );
IACAccess access = loader.getAccessControl();
IRWAccess writer = loader.getWriter();
if ( access.hasAccess( path, FileAccess.DELETE ) && writer.deleteFile( path ) ) {
logger.debug( "File: " + path + " removed" );
JsonUtils.buildJsonResult( response.getOutputStream(), true, null );
} else {
logger.debug( "File: " + path + "not removed" );
JsonUtils.buildJsonResult( response.getOutputStream(), false, null );