ImageGear .NET v25.2 - Updated
ImageGear.Twain Assembly / ImageGear.TWAIN Namespace / ImGearTWAIN Class / DeleteFile Method
The name (not the pathname) of the file or directory to delete.
When recursive is set to true, and the specified fileName is a directory, then all the files and directories within the fileName will be deleted.




In This Topic
    DeleteFile Method
    In This Topic
    This method deletes a file or directory on the device.
    Syntax
    'Declaration
     
    Public Sub DeleteFile( _
       ByVal fileName As String, _
       ByVal recursive As Boolean _
    ) 
    'Usage
     
    Dim instance As ImGearTWAIN
    Dim fileName As String
    Dim recursive As Boolean
     
    instance.DeleteFile(fileName, recursive)
    public void DeleteFile( 
       string fileName,
       bool recursive
    )
    public: void DeleteFile( 
       string* fileName,
       bool recursive
    ) 
    public:
    void DeleteFile( 
       String^ fileName,
       bool recursive
    ) 

    Parameters

    fileName
    The name (not the pathname) of the file or directory to delete.
    recursive
    When recursive is set to true, and the specified fileName is a directory, then all the files and directories within the fileName will be deleted.
    Remarks

    Prior to calling this method, use OpenSource to select the desired Data Source.

    See Also