更新时间:2023-03-14 GMT+08:00
分享

OBSUtil内嵌对象

OBSUtil内嵌对象提供了一系列针对OBS的操作方法,例如判断OBS文件或目录是否存在。

方法

表1 方法说明

方法

说明

示例

boolean isExistOBSPath(String obsPath)

判断OBS文件或目录(目录请以“/”结尾)是否存在,存在返回true,不存在返回false。

  • 判断OBS目录是否存在,目录请以“/”结尾,EL表达式如下:

    #{OBSUtil.isExistOBSPath("obs://test/jobs/")}

  • 判断OBS文件是否存在,EL表达式如下:

    #{OBSUtil.isExistOBSPath("obs://test/jobs/job.log")}

举例

  • 判断OBS目录是否存在,目录请以“/”结尾,EL表达式如下:

    #{OBSUtil.isExistOBSPath("obs://test/jobs/")}

  • 判断OBS文件是否存在,EL表达式如下:

    #{OBSUtil.isExistOBSPath("obs://test/jobs/job.log")}

分享:

    相关文档

    相关产品