Spec-Zone.ru › ColdFusion

fileExists

Определяет, существует ли файл

fileExists(filePath) → returns boolean

  • CF
  • Lucee
  • BL 1.0.0+
  • См. также: fileWrite fileDelete directoryExists

    Аргументы

    filePath строка
    Обязательный

    Абсолютный путь к файлу в файловой системе.

    Примеры
    Пример кода с вызовом функции fileExists

    Проверка существования файла по указанному пути.

    var myFile = "/path/to/the/file.jpg";
    if(fileExists(expandPath(myFile))) {
    	writeOutput(myFile & 'exists!');
    }

    © 2012–present Foundeo, Inc. and the CFDocs contributors.
    Licensed under the MIT License.
    ColdFusion is a trademark of Adobe Systems Incorporated.
    https://cfdocs.org/fileexists

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API