src/Viserio/Component/Filesystem/Encryption/EncryptionWrapper.php
public function write(string $path, $contents, array $config = []): bool
    {
        $contents = $this->encryptString($contents);

        return $this->adapter->write($path, $contents, $config);
    }
public function write(string $path, $contents, array $config = []): bool
    {
        $contents = $this->encryptString($contents);

        return $this->adapter->write($path, $contents, $config);
    }
Write a new file.

@param string $path     the path of the new file
@param string $contents the file contents
@param array  $config   an optional configuration array

@throws \ParagonIE\Halite\Alerts\CannotPerformOperation
@throws \ParagonIE\Halite\Alerts\FileError
@throws \ParagonIE\Halite\Alerts\InvalidDigestLength
@throws \ParagonIE\Halite\Alerts\InvalidKey
@throws \ParagonIE\Halite\Alerts\InvalidMessage
@throws \ParagonIE\Halite\Alerts\InvalidType
@throws \Viserio\Component\Contract\Filesystem\Exception\FileModifiedException
@throws \Viserio\Component\Contract\Filesystem\Exception\FileAccessDeniedException

@return bool true on success, false on failure