async existsContent()

in util/upload/src/lib/minio.ts [127:143]


    async existsContent(fileAddr: string): Promise<Result> {
        try {
            await this.minioClient.statObject(this.bucket, fileAddr);
            return Result.EXISTS;
        } catch (e) {
            if (e instanceof minio.S3Error) {
                if (e.code == "NotFound") {
                    if (this.programOptions["--verbose"])
                        process.stdout.write(`Delete ${fileAddr}: SKIPPED (file doesn't exists).\n`);
                    return Result.DOESNT_EXISTS;
                }
                return Result.ERROR;
            } else {
                return Result.ERROR;
            }
        }
    }