Jump to content

Featured Replies

Posted

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.

Solved by newbie LAC

Go to solution
  • Solution
if (get_class(\IPS\File::getClass('core_Emoticons')) == 'IPS\File\Amazon')
{
}
if (get_class(\IPS\File::getClass('core_Theme')) == 'IPS\File\FileSystem')
{
}

 

  • Author

Excellent, thank you! 

The instanceof operator would also work.

if ( \IPS\File::getClass('core_Emoticon') instanceof \IPS\File\Amazon )
{
	// ... etc ...
}

 

  • Author

Thanks Ryan!

Recently Browsing 0

  • No registered users viewing this page.