Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Utility Namespace / FileHelper Class / SaveToTextFile Method / SaveToTextFile(String,String,Boolean,Encoding) Method
Text contents to write into the file
Path of the destination file.
Set to true if we need to append contents to an existing file, otherwise it will overwrite the file.
Encodign used to save file.
In This Topic
    SaveToTextFile(String,String,Boolean,Encoding) Method
    In This Topic
    Save or append text into a text file, saves using a default encoding as UTF-8.
    Syntax
    public static bool SaveToTextFile( 
       string contents,
       string path,
       bool append,
       Encoding encoding
    )

    Parameters

    contents
    Text contents to write into the file
    path
    Path of the destination file.
    append
    Set to true if we need to append contents to an existing file, otherwise it will overwrite the file.
    encoding
    Encodign used to save file.

    Return Value

    returns true if file saved without any issues.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also