Magento2 Creating a new directory
you can use \Magento\Framework\Filesystem\Io\File
.
Either inject an instance of it in your class or instantiate it manually using new
.
Then do this:
/** @var \Magento\Framework\Filesystem\Io\File $io **/
$io->mkdir($this->directoryList->getPath('media').'/import/images', 0775);
Also, the problem might be because your rights say '775'
as string. Try changing it to 0775
.