Skip to content

All settings

Jiří Petruželka edited this page Aug 13, 2015 · 6 revisions

Project settings

{
    <connection_name>: {
        host: {string},

        username: {null|string=null}, // null means anonymous manipulation
        password: {null|string=""},

        path: {string="/"}, // your project's root path on the _server_

        upload_on_save: {bool=true}, // whether upload on save or manually
        download_on_open: {bool=false}, // checks whether there's a newer remote file on opening a file
        overwrite_newer_prevention: {bool=true}, // overwrite protection when remote file is newer
        upload_delay: {int=0}, // delays [seconds] upload triggered by upload_on_save
        use_tempfile: {bool=true}, // when downloading first download to temporary file and then replace it

        encoding: {string=auto}, // encoding for filenames on FTP server;auto = UTF8 if extension enabled, else nothing
        port: {int=21}, // remote port, pretty much always 21, unless SFTP
        tls: {bool=false}, // set true to use secured transfer, recommended! (server needs to support)
        passive: {bool=true}, // whether to use passive or active connection
        timeout: {int=30}, // [seconds] to invalidate the cached connection
        ignore: {null|string}, // regular expression, matched against file path - not applied for downloading
        time_offset: {int=0}, // [seconds] to adjust for a different timezone of server
        set_remote_lastmodified: {bool=true}, // if MFMT extension is availible, will set true lastModified based on local file

        default_folder_permissions: {string=755}, // default permissions for newly created folders
        default_local_permissions: {null|string="auto"}, // permissions for downloaded files, "auto" = same as on server
        always_sync_local_permissions: {bool=true}, // set permissions for downloaded file even if it already exists

        after_save_watch: {null|list<list<subfolder, filepatter>>=null} // after save watch
        // example: [ [ "code/assets/css", "*.css" ], [ "code/assets/", "*.jpg, *.png, *.gif" ] ]
        // more in Wiki

        debug_extras: {} // see below

    } //,
    // <connection2_name>: { ... }
}

Debug settings

Following settings are extra settings used for finding out specific information during FTPSync's runtime.

{
    print_list_result: bool, // lists the result of FTP LIST command, files in remote folders
    dump_config_load: bool, // prints loaded configuration prior to being merged with defaults
    print_ensure_folders: bool, // prints folders checked when ensuring remote path exists (used when there's issue with uploading into non-existing path)
    debug_remote_paths: bool, // with download or listing prints translated remote path
    after_save_watch: bool, // prints information about scanning of files for after save watch
    debug_get_local_path: bool, // prints info for translation of remote path to local path
    debug_mfmt: bool, // prints info about usage of MFMT command - setting remote last modified value
    debug_overwrite_prevention: bool // prints info about overwrite_prevention - times etc.
}

Example:

{
    "default: {
        "host": "...",
        "username": "...",
        "password": "...",
        "path": "...",

        "debug_extras": {
            "print_list_result": true,
            "debug_mfmt": true
        }
    }
}