MentDB  Mentalese Database Engine
Strong AI, Weak AI, Interoperability and Software Development
    Home  >  MQL Functions
FTP

All remote protocols.

ftp set timeout <connectTimeout>

Description

    To set the FTP timeout.

Parameters

    connectTimeout:   The connect timeout - number - required
admin
ftp set timeout 10000
mentdb
1

ftp connect <sessionId> <jsonObject>

Description

    Connect to a FTP server. (Use "anonymous/ftp4j" for an anonymous connection)

Parameters

    sessionId:   The session id - string - required
    jsonObject:   The json object information - string - required
admin
ftp connect "session1" {cm get "demo_cm_ftp";}
mentdb
1

ftp set type <sessionId> <type>

Description

    Set the transfer type. (TEXTUAL | BINARY | AUTO)

Parameters

    sessionId:   The session id - string - required
    type:   The type (TEXTUAL | BINARY | AUTO) - string - required
admin
ftp set type "session1" "BINARY"
mentdb
1

ftp active compression <sessionId> <bool>

Description

    Active or not the compression.

Parameters

    sessionId:   The session id - string - required
    bool:   Boolean (true | false) - number - required
admin
ftp active compression "session1" true
mentdb
1

ftp active <sessionId>

Description

    Set the active mode.

Parameters

    sessionId:   The session id - string - required
admin
ftp active "session1"
mentdb
1

ftp passive <sessionId>

Description

    Set the passive mode.

Parameters

    sessionId:   The session id - string - required
admin
ftp passive "session1"
mentdb
1

ftp cd <sessionId> <directory>

Description

    Go to another remote directory.

Parameters

    sessionId:   The session id - string - required
    directory:   The remote directory - string - required
admin
ftp cd "session1" "/remote/dir"
mentdb
1

ftp pwd <sessionId>

Description

    Get the current remote directory.

Parameters

    sessionId:   The session id - string - required
admin
ftp pwd "session1"
mentdb
/remote/dir

ftp mkdir <sessionId> <directory>

Description

    Create a remote directory.

Parameters

    sessionId:   The session id - string - required
    directory:   The remote directory - string - required
admin
ftp mkdir "session1" "/remote/dir"
mentdb
1

ftp ls <sessionId> <fileFilterPath>

Description

    Get all files into the current remote directory.

Parameters

    sessionId:   The session id - string - required
    fileFilterPath:   The file filter path - string - required
admin
ftp ls "session1" "*.txt"
mentdb
[]
admin
ftp ls "session1" ""
mentdb
[]

ftp rename <sessionId> <oldFile> <newFile>

Description

    Rename a remote file or directory.

Parameters

    sessionId:   The session id - string - required
    oldFile:   The old file path - string - required
    newFile:   The new file path - string - required
admin
ftp rename "session1" "file1" "file2"
mentdb
1

ftp put <sessionId> <localFile> <mode>

Description

    Upload a file.

Parameters

    sessionId:   The session id - string - required
    localFile:   The local file path - string - required
    mode:   The mode (APPEND | RESUME) - string - required
admin
ftp put "session1" "file1" "RESUME"
mentdb
1

ftp get <sessionId> <remoteFile> <localFile>

Description

    Download a file.

Parameters

    sessionId:   The session id - string - required
    remoteFile:   The remote file path - string - required
    localFile:   The local file path - string - required
admin
ftp get "session1" "remoteFile1" "localFile2"
mentdb
1

ftp rm file <sessionId> <remoteFile>

Description

    Remove a remote file.

Parameters

    sessionId:   The session id - string - required
    remoteFile:   The remote file path - string - required
admin
ftp rm file "session1" "remoteFile1"
mentdb
1

ftp rm dir <sessionId> <remoteDir>

Description

    Remove a remote directory.

Parameters

    sessionId:   The session id - string - required
    remoteDir:   The remote directory path - string - required
admin
ftp rm dir "session1" "remoteDir1"
mentdb
1

ftp disconnect <sessionId>

Description

    Disconnect a session.

Parameters

    sessionId:   The session id - string - required
admin
ftp disconnect "session1"
mentdb
1

ftp disconnect all

Description

    Disconnect all sessions.

admin
ftp disconnect all
mentdb
0
    Home  >  MQL Functions
MentDB © 2012 - 2019