public FtpNodeInformation Parse(string line) { var matches = Match.Empty; foreach (var expression in unixRegexList) { if (!expression.Match(line).Success) { continue; } matches = expression.Match(line); break; } if (!matches.Success) { return(null); } var node = new FtpNodeInformation { NodeType = DetermineNodeType(matches.Groups["permissions"]), Name = DetermineName(matches.Groups["name"]), DateModified = DetermineDateModified(matches.Groups["date"]), Size = DetermineSize(matches.Groups["size"]) }; return(node); }
public FtpNodeInformation Parse(string line) { var matches = unixRegex.Match(line); if (!matches.Success) { return(null); } var node = new FtpNodeInformation { NodeType = DetermineNodeType(matches.Groups["permissions"]), Name = DetermineName(matches.Groups["name"]), DateModified = DetermineDateModified(matches.Groups["date"]), Size = DetermineSize(matches.Groups["size"]) }; return(node); }