In my theme i will use the WP_Filesystem to write a file to for example:
$file = get_template_directory().'/library/assets/css/wpless2css.css';
Which outputs something like
This will work unless the ftp user will be chroot to
/home/user/domain/ (on some servers?).
In the case of a chroot the WP_Filesystem can't find
A solution seems to define
FTP_PATH in wp-config.php into
/home/user/domain/ and use:
if(FTP_BASE) $file = str_replace(FTP_BASE,'',get_template_directory()).'/library/assets/css/wpless2css.css';
I'm looking for a solution more robust and support for the different possible permissions systems.