package com.qmth.boot.core.fss.utils;

import org.apache.commons.lang3.StringUtils;

public class FssUtils {

    public static final String INNER_ENDPOINT_PREFIX = "/fss";

    public static final String INNER_ENDPOINT_PARAM_BUCKET = "bucket";

    public static final String INNER_ENDPOINT_PARAM_EXPIRE_TIME = "expire";

    public static final String INNER_ENDPOINT_PARAM_SIGNATURE = "signature";

    public static final String FILE_PATH_SEPARATOR = "/";

    public static final String SINGLETON_FILE_STORE_NAME = "singleton";

    /**
     * 根据所有层级的目录/文件名称，构造标准的文件路径，用于文件存储的读取/写入
     *
     * @param names
     * @return
     */
    public static String buildPath(String... names) {
        return StringUtils.join(names, FILE_PATH_SEPARATOR);
    }

}
