public function put(string $path, $contents, array $config = []): bool
    {
        if (\is_resource($contents)) {
            $contents = $this->encryptStream($contents);
        } else {
            $contents = $this->encryptString($contents);
        }

        return $this->adapter->put($path, $contents, $config);
    }
public function put(string $path, $contents, array $config = []): bool
    {
        if (\is_resource($contents)) {
            $contents = $this->encryptStream($contents);
        } else {
            $contents = $this->encryptString($contents);
        }

        return $this->adapter->put($path, $contents, $config);
    }
public function put ( string $ path , $ contents , array $ config = [ ] ) : bool { if ( \ is_resource ( $ contents ) ) { $ contents = $ this -> encryptStream ( $ contents ) ; } else { $ contents = $ this -> encryptString ( $ contents ) ; } return $ this -> adapter -> put ( $ path , $ contents , $ config ) ; }
Write the contents of a file.

@param string          $path
@param resource|string $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\FileAccessDeniedException
@throws \Viserio\Component\Contract\Filesystem\Exception\FileModifiedException

@return bool
Write the contents of a file .