How does a plugin make use of Craft's storage?
craft/storage/ is used for all sorts of things, so there’s no single API for storing things in there. Mostly you would just be working with PHP’s standard IO functions like file_put_contents(). There are some handy functions in Craft’s IOHelper class too.

You can get the path to the storage folder via PathService::getStoragePath():



$storagePath = craft()-&gt;path-&gt;getStoragePath();


IOHelper::ensureFolderExists() is a handy function for creating a subfolder for your plugin within craft/storage:

$myStoragePath = $storagePath.'myplugin/';
IOHelper::ensureFolderExists($myStoragePath);