I am trying to use wp-filesystem to write css data.I have things working perfect here.
$filepath = get_template_directory() . '/dynamic/'; $wp_filesystem->mkdir($filepath);
But this generate files in theme folder. But what is if I want to generate in upload folder?
I have tried
$filepath = wp_upload_dir() . '/dynamic/
But it does not work.