Re: AIX No such file *.msg
On Sat, 8 Oct 2005, Hrvoje Niksic wrote: As you said, parsing UNIX directory listings is a nightmare. If someone has a suggestion for better heuristics, please go ahead and suggest. Hmm, use MDTM/SIZE to attempt to get at file dates and sizes and NLST to get lone file names? Easier said, than done, I know... :-( But used by other software and with reasonable FTP servers it works rather well. Maciej
Re: AIX No such file *.msg
Maciej W. Rozycki [EMAIL PROTECTED] writes: On Sat, 8 Oct 2005, Hrvoje Niksic wrote: As you said, parsing UNIX directory listings is a nightmare. If someone has a suggestion for better heuristics, please go ahead and suggest. Hmm, use MDTM/SIZE to attempt to get at file dates and sizes and NLST to get lone file names? Easier said, than done, I know... :-( And that's assuming that all servers support MDTM/SIZE, which I'm not sure is a given. Not at all sure. But used by other software and with reasonable FTP servers it works rather well. But if we assumed reasonable FTP servers then the current parser would work as well.
Re: AIX No such file *.msg
[EMAIL PROTECTED] (Steven M. Schweda) writes: I haven't actually looked, but if the code does _not_ assume that the last thing on the line is the file name, then it would seem to need some work. The code does assume that the last thing on the line is the file name. The twist is that a file name can contain spaces, in which case it's the last two, three, etc., things. Declaring that the file name starts at the ninth column would not work because of BSD and SYSV directory listing having a different column count -- SYSV includes group name by default, while BSD doesn't. So I used month name as an anchor, declaring the file name to begin at the third column after it. That worked well for directory listings in the C locale, which are still prevalent. It breaks completely when confronted with non-English month names or with different order of columns, as seems to be the case here. As you said, parsing UNIX directory listings is a nightmare. If someone has a suggestion for better heuristics, please go ahead and suggest.