| ColdFusion MX | ||
| 目 次 > CFML リファレンス > ColdFusion 関数 > DirectoryExists |
|
|
|
|
||
ディレクトリが存在するかどうかを調べます。
指定されたディレクトリが存在する場合は YES、存在しない場合は NO。
DirectoryExists(absolute_path)
パラメータ |
説明 |
|---|---|
absolute_path |
絶対パスです。 |
<h3>DirectoryExists の例</h3>
<h3>ディレクトリを入力して、その存在を確認します。</h2>
<form action = "directoryexists.cfm" method="post">
<input type = "text" name = "yourDirectory">
<br>
<input type = "submit" name = "submit">
</form>
<cfif IsDefined("FORM.yourDirectory")>
<cfif FORM.yourDirectory is not "">
<cfset yourDirectory = FORM.yourDirectory>
<cfif DirectoryExists(yourDirectory)>
<cfoutput>
<p>指定されたディレクトリが存在します。ディレクトリ名は#yourDirectory#
</cfoutput>
<cfelse>
<p>ディレクトリが存在しません。</p>
</cfif>
</cfif>
</cfif>
|
|
||
| 目 次 > CFML リファレンス > ColdFusion 関数 > DirectoryExists |
|
|