求助!!!Fastdfs删除文件的问题!

fastdfs删除文件的源码,有没有可扩展的先进行判断fastdfs有无此文件的方法?

源码如下:
public int delete_file(String group_name, String remote_filename) throws IOException, MyException {
    boolean bNewConnection = this.newUpdatableStorageConnection(group_name, remote_filename);
    Socket storageSocket = this.storageServer.getSocket();

    try {
        this.send_package(ProtoCommon.STORAGE_PROTO_CMD_DELETE_FILE, group_name, remote_filename);
        ProtoCommon.RecvPackageInfo pkgInfo = ProtoCommon.recvPackage(storageSocket.getInputStream(),
                                                                      ProtoCommon.STORAGE_PROTO_CMD_RESP, 0);

        this.errno = pkgInfo.errno;
        return pkgInfo.errno;
    } catch (IOException ex) {
        if (!bNewConnection) {
            try {
                this.storageServer.close();
            } catch (IOException ex1) {
                ex1.printStackTrace();
            } finally {
                this.storageServer = null;
            }
        }

        throw ex;
    } finally {
        if (bNewConnection) {
            try {
                this.storageServer.close();
            } catch (IOException ex1) {
                ex1.printStackTrace();
            } finally {
                this.storageServer = null;
            }
        }
    }
}

你可能感兴趣的:(求助!!!Fastdfs删除文件的问题!)