@Override
    public synchronized boolean delete(SyndicateFSPath path) throws FileNotFoundException, IOException {
        if(path == null) {
            LOG.error("path is null");
            throw new IllegalArgumentException("path is null");
        }
        
        SyndicateFSPath absPath = getAbsolutePath(path);
        SyndicateFSFileStatus status = getFileStatus(absPath);
        if(status == null) {
            LOG.error("file not exist");
            throw new FileNotFoundException("file not exist : " + path.getPath());
        }
        
        if(status.isFile()) {
            Future<ClientResponse> unlinkFuture = this.client.unlink(absPath.getPath());
            if(unlinkFuture != null) {
                try {
                    this.client.processUnlink(unlinkFuture);
                } catch (RestfulException ex) {
                    LOG.error("exception occurred", ex);
                    throw new IOException(ex);
                }
            } else {
                throw new IOException("Can not create a REST client");
            }
        } else if(status.isDirectory()) {
            Future<ClientResponse> removeDirFuture = this.client.removeDir(absPath.getPath());
            if(removeDirFuture != null) {
                try {
                    this.client.processRemoveDir(removeDirFuture);
                } catch (RestfulException ex) {
                    LOG.error("exception occurred", ex);
                    throw new IOException(ex);
                }
            } else {
                throw new IOException("Can not create a REST client");
            }
        } else {
            LOG.error("Can not delete from unknown status");
            throw new IOException("Can not delete from unknown status");
        }
        
        this.filestatusCache.remove(absPath);
        return true;
    }