Discuss this help topic in SecureBlackbox Forum

TElSftpClient.CreateFile

TElSftpClient     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Creates new file on a server side.

Declaration

[C#]
    bool CreateFile(string Filename);

[VB.NET]
    Function CreateFile(ByVal Filename As String) As Boolean

[Pascal]
    function CreateFile(Filename : string): Boolean;
    function CreateFileSync(const Filename: string): TSBSftpFileHandle;
    type TSBSftpFileHandle = ByteArray;

[C++]
    bool CreateFile(const std::string &Filename);

[PHP]
    bool CreateFile(string $Filename)

[Java]
    boolean createFile(String Filename);

Parameters

  • Filename - name of the newly created file

Return value

    CreateFile returns True if operation was completed successfully, and False otherwise.
    CreateFileSync returns handle to the newly created file.

Description

    Use CreateFile method to create a file on a server side asynchronously, and CreateFileSync to create a file in synchronous mode. If the file was successfully created, the OnOpenFile event is fired. The OnError event is fired otherwise.

See also:     OpenFile     RemoveFile     Read     Write    

Discuss this help topic in SecureBlackbox Forum