Checks if the file is a MKA.

@return boolean|null
296
protected function leadMKA()
	{
		$lead = $this->ffprobeFormat("matroska", "webm");

		if ($lead === true)
		{
			if ($this->ffprobeHasAudio() !== false)
			{
				return $this->closeCase("mka", "audio/x-matroska", $this->metadata);
			}
			else
			{
				return false;
			}
		}

		return null;
	}
629426
public function detectMime() {

        $fileInfo = new \finfo(FILEINFO_MIME);

        return $fileInfo->buffer($this->getContent(), FILEINFO_MIME) ?: null;
    }
766380
public static function isTtySupported(): bool
    {
        static $isTtySupported;

        if (null === $isTtySupported) {
            $isTtySupported = (bool) @proc_open('echo 1 >/dev/null', [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']], $pipes);
        }

        return $isTtySupported;
    }
904724
public function isValid(Memento\Key $key = null, $expired = false)
    {
        $keyPath = $this->getExpiresPath($key);

        // if we are to look for expired files that exist, we must examine ttl instead
        if ($expired === true) {
            $ttlPath = $this->getTtlPath($key);
            $ttlFile = $ttlPath . DIRECTORY_SEPARATOR . self::FILENAME_TTL;

            if (!file_exists($ttlFile)) {
                return false;
            }

            $ttl = intval(file_get_contents($ttlFile));
            if (!is_numeric($ttl)) {
                return false;
            }

            if (time() > $ttl) {
                return false;
            }

            return true;
        }

        $expiresFile = $keyPath . DIRECTORY_SEPARATOR . self::FILENAME_EXPIRES;

        if (!file_exists($expiresFile)) {
            return false;
        }

        $expires = intval(file_get_contents($expiresFile));
        if (!is_numeric($expires)) {
            return false;
        }

        if (time() > $expires) {
            return false;
        }

        return true;
    }
278923
public function isMdmMessage($isMdmMessage = null)
    {
        if ($isMdmMessage === null) {
            return $this->isMdmMessage;
        }

        $this->isMdmMessage = (bool) $isMdmMessage;
    }
365502
public function isExists()
    {
        clearstatcache(true,(string)$this->resource);
        return is_file((string)$this->resource);
    }
1277889
private function determine()
	{

		if (false !== $this->filepath && true === is_readable($this->filepath . '/' . $this->filename)) {
			return strtolower(trim(file_get_contents($this->filepath . '/' . $this->filename)));
		} elseif (null !== getenv($this->variable)) {
			return getenv($this->variable);
		} else {
			return false;
		}
	}
127331
protected function fileExists()
    {
        $this->clearStatCache(true);
        return (file_exists($this->file_path) && is_file($this->file_path));
    }
905037
protected function validateFile()
    {
        $id = $this->getUpdatingId();

        if ($id === false) {
            return null;
        }

        $data = $this->file->get($id);

        if (empty($data)) {
            $this->setErrorUnavailable('update', $this->translation->text('File'));
            return false;
        }

        $this->setSubmitted('update', $data);
        return true;
    }
863391
protected function hasPreviousCharacter()
	{
		return key($this->characters) !== null 
			&& array_key_exists(key($this->characters) - 1, $this->characters);
	}
111363
public function isImage()
	{
		$mime = $this->getMimeType();
		
		// The $imageMimes property contains an array of file extensions and
		// their associated MIME types. We will loop through them and look for 
		// the MIME type of the current SymfonyUploadedFile.
		foreach ($this->imageMimes as $imageMime)
		{
			if (in_array($mime, (array) $imageMime))
			{
				return true;
			}
		}

		return false;
	}
468454
public function getCa() : ?string
    {
        if (isset($this->config['ca']) && is_file($this->config['ca'])) {
            return $this->config['ca'];
        }

        return null;
    }
1115451
protected function hasMelisCmsModule()
    {
        $modulesSvc = $this->getServiceLocator()->get('MelisAssetManagerModulesService');
        $modules = $modulesSvc->getAllModules();
        $path = $modulesSvc->getModulePath('MelisCms');
        $isExists = 0;

        if (file_exists($path)) {
            $isExists = 1;
        }

        return $isExists;
    }
234934
protected function leadMKV()
	{
		$lead = $this->ffprobeFormat("matroska", "webm");

		if ($lead === true)
		{
			if ($this->ffprobeHasVideo() !== false)
			{
				return $this->closeCase("mkv", "video/x-matroska", $this->metadata);
			}
			else
			{
				return false;
			}
		}

		return null;
	}
1164975
protected function validateFileExport()
    {
        $directory = gplcart_file_private_module('export');

        if (!file_exists($directory) && !mkdir($directory, 0775, true)) {
            $this->setError('file', $this->text('Unable to create @name', array('@name' => $directory)));
            return false;
        }

        $date = date('d-m-Y--H-i');
        $file = gplcart_file_unique("$directory/$date.csv");

        if (file_put_contents($file, '') === false) {
            $this->setError('file', $this->text('Unable to create @name', array('@name' => $file)));
            return false;
        }

        $this->setSubmitted('file', $file);
        return true;
    }
787155
public function isAbsolute()
    {
        $filepath = $this->getPathname();
        if (isset($filepath[0]) && $filepath[0] == self::PATH_SEPARATOR) {
            return true;
        }
        return false;
    }
930377
public function isPackage()
	{
		if ( isset( $this->contents[ $this->getFirstFolderName() ][ \XBRL_TaxonomyPackage::metaFolderName ] ) ) return false;

		$found = false;

		// Look for the full_ifrs_dk folder
		$this->traverseContents( function( $path, $name, $type ) use( &$found )
		{
			if ( $type != PATHINFO_DIRNAME ) return true;
			$found = $name == 'full_ifrs_dk';
			return ! $found;
		} );

		if ( ! $found ) return false;
		if ( ! parent::isPackage() ) return false;

		// Find the version number folder and make the contents start at this folder
		$this->traverseContents( function( $path, $name, $type ) use( &$contents, &$found )
		{
			if ( $type != PATHINFO_DIRNAME ) return true;
			$found = strlen( $name ) == 8 && is_numeric( $name );
			if ( ! $found ) return true;

			$this->contentsPath = $path;
			$this->version = $name;

			return ! $found;
		} );

		if ( ! $found ) return false;

		$this->originalContents &= $this->contents;

		$parts = array_filter( explode( "/", $this->contentsPath ) );
		if ( count( $parts ) > 1 )
		{
			$this->contents =& $this->contents[ $this->getFirstFolderName() ];
		}

		array_pop( $parts );
		$this->contentsPath = implode( "/", $parts );

		if ( $this->contentsPath ) $this->contentsPath .= "/";

		return true;
	}