[TYPO3-team-core-v5] Getting rid of DIRECTORY_SEPARATOR reloaded
Bastian Waidelich
waidelich at network-publishing.de
Sun Jul 27 20:37:34 CEST 2008
Malte Jansen wrote:
Hi Malte,
> IMO a path should always end with a slash
I don't really think so. It's easier to append a slash if needed, than
to crop a slash which is not needed. Besides, a path can also point to a
file ("/foo/bar/file.php").
> the pathes in the array should be UnixStyle
The thing is: you don't always know whether a path has to be transformed
or not. E.g. when you have to write a file to a path which the user can
set in the configuration.
Sure, especially in the core packages we can take care of this and it's
done already in a lot of places. But a helper function might reduce
duplicated code and help other package developers.
But you're right, at the cost of performance..
Thanks,
Bastian
--
slice up the elephant, baby!
More information about the TYPO3-team-core-v5
mailing list