@@ -53,7 +53,7 @@ type FtpProviderImpl(config : TypeProviderConfig) as this =
5353
5454 td.AddMembersDelayed( fun () ->
5555 // TODO.6
56- if diag then printfn " debug: getting site: %s , user: %s , pwd: %s " site user ( String.replicate ( pwd.Length) " # " )
56+ if diag then printfn " debug: getting site: %s , user: %s , pwd: %s " site user ( String.replicate ( pwd.Length) " * " )
5757 let files , dirs = getFtpDirectory ( site, user, pwd)
5858
5959 [
@@ -71,31 +71,31 @@ type FtpProviderImpl(config : TypeProviderConfig) as this =
7171
7272 let contentsProperty =
7373 ProvidedProperty( " Contents" , typeof< obj>,
74- GetterCode =
75- ( fun args ->
76- <@@
77- if diag then printfn " debug: getting %s%s " site file
78- let request = WebRequest.Create( site + file) :?> FtpWebRequest
79-
80- if diag then printf " - debug: 1)getting"
81- request.Method <- WebRequestMethods.Ftp.DownloadFile
82- request.Credentials <- new NetworkCredential( user, pwd)
83- let response = request.GetResponse() :?> FtpWebResponse // TODO.2
84-
85- if diag then printf " ,2)streaming"
86- use responseStream = response.GetResponseStream()
87- use reader = new StreamReader( responseStream)
88-
89- if diag then printf " ,3)reading"
90- let r = reader.ReadToEnd() :> obj
91- if diag then printfn " ,4)returning info"
92- r
93-
94- // TODO.3
95-
96- @@>))
74+ GetterCode = ( fun args -> <@@ " the file contents" @@> ))
75+ // GetterCode =
76+ // (fun args ->
77+ // <@@
78+ // if diag then printfn "debug: getting %s%s" site file
79+ // let request = WebRequest.Create(site + file) :?> FtpWebRequest
80+ //
81+ // if diag then printf " - debug: 1)getting"
82+ // request.Method <- WebRequestMethods.Ftp.DownloadFile
83+ // request.Credentials <- new NetworkCredential(user, pwd)
84+ // let response = request.GetResponse() :?> FtpWebResponse // TODO.2
85+ //
86+ // if diag then printf ",2)streaming"
87+ // use responseStream = response.GetResponseStream()
88+ // use reader = new StreamReader(responseStream)
89+ //
90+ // if diag then printf ",3)reading"
91+ // let r = reader.ReadToEnd() :> obj
92+ // if diag then printfn ",4)returning info"
93+ // r
94+ //
95+ // // TODO.3
96+ //
97+ // @@>))
9798 nestedType.AddMember contentsProperty
98-
9999 yield nestedType :> MemberInfo
100100 ]
101101 )
0 commit comments