Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Utility Namespace / FileHelper Class / CanCreateFile Method / CanCreateFile(String,String) Method
Full physical path of the file to attempt to create.
Text content to write to the file.
In This Topic
    CanCreateFile(String,String) Method
    In This Topic
    Tests for the ability to create (write) the specified file
    Syntax
    public static Exception CanCreateFile( 
       string fileName,
       string fileContent
    )

    Parameters

    fileName
    Full physical path of the file to attempt to create.
    fileContent
    Text content to write to the file.

    Return Value

    Exception that occurred during the test, or null if the test succeeded.
    Remarks
    The the given file path already exists, this method will attempt to overwrite it.
    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