FAKE FtpHelper Usage

210 views Asked by At

I am trying to use F# FAKE to deploy a zip file to GoDaddy using FTP. There seems to be a FTPHelper in FAKE but I can't find any usage examples of how to create a target to use it.

archived: http://fsharp.github.io/FAKE/apidocs/fake-ftphelper.html

All I've been able to come up with is,

Target "Ftp" (fun _ ->
        |> Request uploadAFolder (fun p ->
        {p with
            server = ftp://10.100.200.300:21/;
            user = joey;
            pwd = somepassword1;
            srcPath = buildDir;
            rootPath = /httpdoc;
        })
)

I am a n00b still learning F# so the syntax is still a bit foreign to me and there doesn't seem to be any tutorials yet for using it and the above doesn't seem to be close to being right. Does anyone have a bit more insight to show me how the FtpHelper usage should be?

1

There are 1 answers

0
Matthew Mcveigh On BEST ANSWER

uploadAFolder is a function defined as:

val uploadAFolder: server:string -> user:string -> pwd:string -> srcPath:string -> rootDir:string -> unit

The function takes several parameters rather than a single record. I believe it would be used as follows:

Target "Ftp" (fun _ -> 
    uploadAFolder "ftp://10.100.200.300:21/" "joey" "somepassword1" "buildDir" "/httpdoc"
)