FTP: Implement MLSD for structured listing of directories#2345
FTP: Implement MLSD for structured listing of directories#2345blar wants to merge 3 commits intophp:masterfrom blar:master
Conversation
|
This doesn't appear to come with tests, is it possible to add some ? |
| PHP_FE(ftp_alloc, arginfo_ftp_alloc) | ||
| PHP_FE(ftp_nlist, arginfo_ftp_nlist) | ||
| PHP_FE(ftp_rawlist, arginfo_ftp_rawlist) | ||
| PHP_FE(ftp_mlsd, arginfo_ftp_mlsd) |
|
Merged 0103d1e Thanks. |
|
Nice work on this one. Was thinking, what if we had an option to return the results in a nicer format? so instead of a string that will most likely needed to be parsed, then having it as an array. For example (using the first line from the test results): <?php
var_dump(ftp_mlsd($ftp_s, '/hello/world', true)[0]);
?>Output |
|
Agree with @KalleZ, I think it would be good to parse the result. |
|
Generally, I'd appreciate it if enhancement PRs were left open a bit longer, as they usually generate more discussion (see also: Recent PHP_OS_FAMILY merge). Merging a function addition after one day on a weekend does not really allow for any discussion. |
|
@nikic it was merged into master only ... plenty of time for implementing whatever improvements are necessary. In my defence, FTP is extremely poorly maintained, to the point that it's one of the extensions Stas has shortlisted for removal ... I just didn't think anyone would be interested in it ... I do obviously agree, my mistake ... I guess we should leave enhancements open for a minimum of one week ? |
|
@krakjoe The trouble with improving things after they're merged is that someone needs to make sure it happens. In this specific case I suspect that neither @KalleZ nor me care much about this, so it's likely that this will be forgotten after a couple of days. I don't want to impose too much process on this (after all, we also don't want to have PRs sitting around indefinitely), so I don't think we need to have a specific minimum period at this point -- just that one day is a bit tight. |
|
Fair enough, duly noted. |
|
Sounds fine. @blar would you mind opening a PR to implement that idea ? |
|
I created a pull request #2364 FTP: Rename function for MLSD. I am working on the parser for the file list. |
decribed at https://tools.ietf.org/html/rfc3659