class ObsObjectStoreServiceImpl implements ObjectStoreService {
    private final ObsClient obsClient;
    private final String bucketName;
    private final String rootPath;

    public ObsObjectStoreServiceImpl(ObsClient obsClient, String bucketName, String rootPath) {
        this.obsClient = obsClient;
        this.bucketName = bucketName;
        if (rootPath.startsWith(SignConstants.RIGHT_DASH)) {
            this.rootPath = rootPath.substring(1);
        } else {
            this.rootPath = rootPath;
        }
    }

    @Override
    public boolean upload(String filePath, InputStream is) {
        var objectKey = getObjectKey(filePath);
        var response = obsClient.putObject(bucketName, objectKey, is);
        return Objects.equals(response.getStatusCode(), 200);
    }

    @Override
    public FileDTO download(String filePath) {<FILL_FUNCTION_BODY>}

    @Override
    public List<FileDTO> list(String dir) {
        var request = new ListObjectsRequest(bucketName);
        request.setPrefix(getObjectKey(dir));
        return obsClient.listObjects(request).getObjects()
                .stream()
                .map(it -> new FileDTO(it.getObjectKey(), it.getObjectContent()))
                .collect(Collectors.toUnmodifiableList());
    }

    @Override
    public ObjectStoreDTO.Type type() {
        return ObjectStoreDTO.Type.OBS;
    }

    private String getObjectKey(String filePath) {
        return rootPath + SignConstants.RIGHT_DASH + filePath;
    }

}

        var objectKey = getObjectKey(filePath);
        try {
            var obsObject = obsClient.getObject(bucketName, objectKey);
            return new FileDTO(filePath, obsObject.getObjectContent());
        } catch (Exception ex) {
            log.warn("download file from obs error {}", objectKey);
            return null;
        }
    
<no_super_class>