The Old Man Posted October 3, 2020 Share Posted October 3, 2020 From within a plugin, I want to establish the status of a file storage setting. Is it possible to check what or if a Storage Setting Configuration is set to either local or remote S3 storage for a specific file category (say custom emoji, reactions, or theme resources etc)? If so how can I do this? Many thanks. Link to comment Share on other sites More sharing options...
Solution newbie LAC Posted October 4, 2020 Solution Share Posted October 4, 2020 if (get_class(\IPS\File::getClass('core_Emoticons')) == 'IPS\File\Amazon') { } if (get_class(\IPS\File::getClass('core_Theme')) == 'IPS\File\FileSystem') { } BomAle and The Old Man 1 1 Link to comment Share on other sites More sharing options...
The Old Man Posted October 4, 2020 Author Share Posted October 4, 2020 Excellent, thank you! Link to comment Share on other sites More sharing options...
Ryan Ashbrook Posted October 4, 2020 Share Posted October 4, 2020 The instanceof operator would also work. if ( \IPS\File::getClass('core_Emoticon') instanceof \IPS\File\Amazon ) { // ... etc ... } The Old Man 1 Link to comment Share on other sites More sharing options...
The Old Man Posted October 4, 2020 Author Share Posted October 4, 2020 Thanks Ryan! Link to comment Share on other sites More sharing options...
Recommended Posts