| ColdFusion MX | ||
| 目 次 > CFML リファレンス > ColdFusion 関数 > FileExists |
|
|
|
|
||
ファイルが存在するかどうかを調べます。
パラメータに指定されたファイルが存在する場合は YES、存在しない場合は NO
FileExists(absolute_path)
DirectoryExists、ExpandPath、GetTemplatePath
パラメータ |
説明 |
|---|---|
absolute_path |
絶対パスです。 |
<h3>FileExists の例</h3>
<cfset thisPath = ExpandPath("*.*")>
<cfset thisDirectory = GetDirectoryFromPath(thisPath)>
<cfoutput>
現在のディレクトリ : #GetDirectoryFromPath(thisPath)#
<cfif IsDefined("FORM.yourFile")>
<cfif FORM.yourFile is not "">
<cfset yourFile = FORM.yourFile>
<cfif FileExists(ExpandPath(yourfile))>
<p>ファイルはこのディレクトリに存在します。
正しいファイル名 #GetFileFromPath("#thisPath#/#yourfile#")# を入力しました。
<cfelse>
|
|
||
| 目 次 > CFML リファレンス > ColdFusion 関数 > FileExists |
|
|
このページに新しいコメントが追加された場合に、電子メールでの通知を希望する。 | コメントレポート
現在のページ: http://livedocs.adobe.com/coldfusion/6.1_jp/htmldocs2/functi79.htm