public static function fromFile($path) {

        if(!is_file($path) || !is_readable($path)) {

            throw new TempFileException(sprintf('File %s does not exist or is not readable.', $path));
        }

        $tempFile = new static();
        $tempFile->closeFileHandle();

        if(!copy($path, $tempFile->filePath)) {

            throw new TempFileException(sprintf('Could not read in file %s.', $path));
        }

        $tempFile->openFileHandle('r+');

        return $tempFile;
    }