Spec-Zone.ru › ColdFusion

fileClose

Закрывает открытый файл на диске или в памяти.

fileClose(file) → returns void

  • CF8+
  • Lucee
  • BL 1.0.0+
  • См. также: fileOpen

    Аргументы

    file any
    Обязательный

    Объект файла

    Примеры
    Пример кода, вызывающего функцию fileClose

    Открывает файл, считывает строку и закрывает его.

    // Open File
    var fileObject = fileOpen("/path/to/file.txt");
    
    // Perform Actions
    try
    {
    	// Read Line
    	writeOutput(fileReadLine(fileObject));
    }
    
    // Error Handling
    catch(any ex)
    {
    	// Report Exception
    	writeDump(ex);
    }
    
    // Always Close
    finally
    {
    	// Close File
    	fileClose(fileObject);
    }

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

    Spec-Zone.ru

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