Discuss this help topic in SecureBlackbox Forum
Opens a file on the server.
Declaration
Parameters
- Filename - the name of the file to be opened.
- Modes - specifies the file opening modes.
- Attributes - specifies the initial attributes for the file.
- Access - specifies if file must be blocked for reading, writing, or deleting while opened.
TSBSftpFileOpenMode values:
TSBSftpFileOpenAccessItem values:
TSBSftpFileOpenModes values
TSBSftpFileOpenAccess values
TSBSftpFileOpenModes values
TSBSftpFileOpenModes values
TSBSftpFileOpenModes values
TSBSftpFileOpenAccess values
TSBSftpFileOpenModes values
TSBSftpFileOpenAccess values
TSBSftpFileOpenModes values
TSBSftpFileOpenModes values
TSBSftpFileOpenModes values
TSBSftpFileOpenModes values
TSBSftpFileOpenModes values
TSBSftpFileOpenAccess values
TSBSftpFileOpenModes values
TSBSftpFileOpenAccess values
TSBSftpFileOpenModes values
TSBSftpFileOpenModes values
TSBSftpFileOpenModes values
TSBSftpFileOpenModes values
TSBSftpFileOpenModes values
TSBSftpFileOpenAccess values
TSBSftpFileOpenModes values
TSBSftpFileOpenAccess values
TSBSftpFileOpenModes values
TSBSftpFileOpenModes values
TSBSftpFileOpenModes values
TSBSftpFileOpenModes values
Return value
OpenFile returns True if the operation was completed successfully, and False otherwise.
OpenFileSync returns a handle to the opened file.
Description
Use OpenFile to open files on a server side in asynchronous mode, and OpenFileSync to open files in synchronous mode.
If the file was successfully opened, the OnOpenFile event is fired.
The OnError event is fired otherwise.
The file is opened in binary mode, unless fmText flag is included to Modes parameter.
After you have finished using the directory, close the handle with a call to CloseHandle() method.
Note, the Access parameter has sense only for SFTPv5 and will be ignored for earlier versions.
Note, setting of file opening mode differs for VCL and .NET versions.
To enable several modes in .NET use bitwise OR operation, for example "fmRead | fmWrite | fmAppend".
Discuss this help topic in SecureBlackbox Forum