Spec-Zone.ru › ColdFusion

fileReadLine

Возвращает следующую строку из файла

fileReadLine(file) → returns string

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

    Описание аргументов

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

    объект файла, ранее открытый с помощью fileOpen()

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

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

    // 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/filereadline

    Spec-Zone.ru

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