Spec-Zone.ru › ColdFusion

fileReadLine

Returns the next line from the file

fileReadLine(file) → returns string

  • CF8+
  • Lucee
  • BL 1.0.0+
  • See Also: fileOpen fileClose fileIsEOF fileRead fileWrite

    Argument Reference

    file any
    Required

    file object previously opened with fileOpen()

    Examples
    Sample code invoking the fileReadLine function

    Opens a file, reads a line then closes it.

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