Files
doc-exports/docs/dataartsstudio/umn/dataartsstudio_01_0553.html
chenxiaoxiong c3942cbc2c DataArts UMN 20241028 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: chenxiaoxiong <chenxiaoxiong@huawei.com>
Co-committed-by: chenxiaoxiong <chenxiaoxiong@huawei.com>
2025-07-09 13:09:06 +00:00

40 lines
3.7 KiB
HTML

<a name="dataartsstudio_01_0553"></a><a name="dataartsstudio_01_0553"></a>
<h1 class="topictitle1">OBSUtil Embedded Objects</h1>
<div id="body1591779699959"><p id="dataartsstudio_01_0553__p1042412910810">The OBSUtil embedded objects provide a series of OBS operation methods, for example, checking whether an OBS file or directory exists.</p>
<div class="section" id="dataartsstudio_01_0553__section1305173518816"><h4 class="sectiontitle">Methods</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_0553__table124871918198" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Method description</caption><thead align="left"><tr id="dataartsstudio_01_0553__row24881718491"><th align="left" class="cellrowborder" valign="top" width="25.21%" id="mcps1.3.2.2.2.4.1.1"><p id="dataartsstudio_01_0553__p1448813184910">Method</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="30.34%" id="mcps1.3.2.2.2.4.1.2"><p id="dataartsstudio_01_0553__p19488101819911">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.45%" id="mcps1.3.2.2.2.4.1.3"><p id="dataartsstudio_01_0553__p177261857334">Example</p>
</th>
</tr>
</thead>
<tbody><tr id="dataartsstudio_01_0553__row248818181297"><td class="cellrowborder" valign="top" width="25.21%" headers="mcps1.3.2.2.2.4.1.1 "><p id="dataartsstudio_01_0553__p651195712712">boolean isExistOBSPath(String obsPath)</p>
</td>
<td class="cellrowborder" valign="top" width="30.34%" headers="mcps1.3.2.2.2.4.1.2 "><p id="dataartsstudio_01_0553__p8511105718717">Check whether the OBS file or the OBS directory that ends with a slash (/) exists. If the file or directory exists, <strong id="dataartsstudio_01_0553__b19521693315">true</strong> is returned. If not, <strong id="dataartsstudio_01_0553__b1150219145331">false</strong> is returned.</p>
</td>
<td class="cellrowborder" valign="top" width="44.45%" headers="mcps1.3.2.2.2.4.1.3 "><ul id="dataartsstudio_01_0553__ul1397197133518"><li id="dataartsstudio_01_0553__li149747163519">The following is the EL expression for checking whether the OBS directory that ends with a slash (/) exists:<p id="dataartsstudio_01_0553__p497273350"><a name="dataartsstudio_01_0553__li149747163519"></a><a name="li149747163519"></a>#{OBSUtil.isExistOBSPath("obs://test/jobs/")}</p>
</li></ul>
<ul id="dataartsstudio_01_0553__ul199719763517"><li id="dataartsstudio_01_0553__li159707183518">The following is the EL expression for checking whether the OBS file exists:<p id="dataartsstudio_01_0553__p5978710359"><a name="dataartsstudio_01_0553__li159707183518"></a><a name="li159707183518"></a>#{OBSUtil.isExistOBSPath("obs://test/jobs/job.log")}</p>
</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dataartsstudio_01_0553__section146218581191"><h4 class="sectiontitle">Examples</h4><ul id="dataartsstudio_01_0553__ul25541314141019"><li id="dataartsstudio_01_0553__li555521471019">The following is the EL expression for checking whether the OBS directory that ends with a slash (/) exists:<p id="dataartsstudio_01_0553__p4512175713720"><a name="dataartsstudio_01_0553__li555521471019"></a><a name="li555521471019"></a>#{OBSUtil.isExistOBSPath("obs://test/jobs/")}</p>
</li></ul>
</div>
<ul id="dataartsstudio_01_0553__ul19857192214105"><li id="dataartsstudio_01_0553__li38571522201012">The following is the EL expression for checking whether the OBS file exists:<p id="dataartsstudio_01_0553__p251245712717"><a name="dataartsstudio_01_0553__li38571522201012"></a><a name="li38571522201012"></a>#{OBSUtil.isExistOBSPath("obs://test/jobs/job.log")}</p>
</li></ul>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dataartsstudio_01_0493.html">EL Expression Reference</a></div>
</div>
</div>