Spec-Zone.ru › ColdFusion

fileWrite

Writes the data to the file object or file path specified using the charset specified or the java default character set if unspecified.

fileWrite(filePath, data [, charset]) → returns void

  • CF8+
  • Lucee
  • BL 1.0.0+
  • See Also: cffile fileAppend fileWriteLine

    Argument Reference

    filePath any
    Required

    A file object or a file system path string.

    data any
    Required

    The variable to write to the file.

    charset string

    An optional character set that the data is encoded with. Defaults to the Java default character set (which is usually UTF-8).

    Examples
    Sample code invoking the fileWrite function

    Write a Temporary File

    fileWrite( getTempFile( getTempDirectory(), "tempFile"), "My Data" );

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

    Spec-Zone.ru

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