Skip to content

Commit

Permalink
- Added filepath-parameter description foundeo#1538
Browse files Browse the repository at this point in the history
- Added expandPath to example
- Not runnable, because fileExists is not allowed on trycf
  • Loading branch information
Xcreen committed Oct 11, 2022
1 parent c04667a commit 0d058cf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions data/en/fileexists.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"related":["fileWrite","fileDelete","directoryExists"],
"description":"Determines whether a file exists",
"params": [
{"name":"filePath","description":"","required":true,"default":"","type":"string","values":[]}
{"name":"filePath","description":"A absolute file system path string.","required":true,"default":"","type":"string","values":[]}
],
"engines": {
"coldfusion": {"minimum_version":"", "notes":"", "docs":"https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-e-g/fileexists.html"},
Expand All @@ -19,8 +19,9 @@
{
"title": "Checks if file at the given path exists.",
"description": "",
"code": "var myFile = \"/path/to/the/file.jpg\";\r\nif(fileExists(myFile)) {\r\n\twriteOutput(myFile & 'exists!');\r\n}",
"result": ""
"code": "var myFile = \"/path/to/the/file.jpg\";\r\nif(fileExists(expandPath(myFile))) {\r\n\twriteOutput(myFile & 'exists!');\r\n}",
"result": "",
"runnable": false
}
]
}

0 comments on commit 0d058cf

Please sign in to comment.