Updated 2012-09-08 16:42:04 by RLE


A small and simple ftp demon, written by Matt Newman.


Here's a sample script that configures and starts the ftpd server:
namespace eval ::ftpd {
    variable welcome "tcllib FTP server on [info hostname] ready."
package require ftpd

proc myAuthUsrCmd {user pass} {
    puts "accepting everything: $user/$pass"
    return 1
proc myLogCmd {lvl msg} {
    if {$lvl eq "note"} {
        puts stderr $msg
    } else {
        puts stderr "\[$lvl\] $msg"
::ftpd::config -authUsrCmd myAuthUsrCmd -logCmd myLogCmd
::ftpd::fsFile::docRoot c:/myFtpRoot

if {! [info exists tk_version]} {
    vwait forever