I am playing around with FtpWebRequest and I am wondering how can I format the result?
FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create("");
ftp.Credentials = new NetworkCredential("", "");
ftp.KeepAlive = true;
ftp.Method = WebRequestMethods.Ftp.ListDirectoryDetails;
WebResponse response = ftp.GetResponse();
StreamReader reader = new StreamReader(response
.GetResponseStream());
string r = reader.ReadLine();
response.Close();
reader.Close();
I get results like this back
09-17-11 01:00AM 942038 my.zip
What would be a good way to parse this into like an object say something like
public Class Test()
{
public DateTime DateCreated? {get; set;}
public int/long Size {get; set;}
public string Name {get; set;}
}
Not sure if I should use a long or int for the size. I am also not sure what the datetime is actually if it is created, or modified or whatever.