private void ParseSocketResponse(SocketResponse socketResponse) { string[] lines = socketResponse.Message.Split("\r\n"); if (lines.Length == 0) { return; } foreach (var line in lines) { if (line.Length == 0) { break; } if (line.Contains('\0')) { break; } bool isDirectory = line[0] == 'd'; string fileName = line.Split(" ").Last(); _files.Add(fileName, isDirectory); } }
public FTPFolderStructure(SocketResponse socketResponse) { ParseSocketResponse(socketResponse); }