コード例 #1
0
        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);
            }
        }
コード例 #2
0
 public FTPFolderStructure(SocketResponse socketResponse)
 {
     ParseSocketResponse(socketResponse);
 }