Specify the pdf location

@param string $folder The name of the desired folder. Creates a new one if folder doesn't exist.
485858
public function setFolderName($folder = null) {
    if($folder) {
      $folder = Folder::find_or_make($folder);
      $this->folderID = $folder->ID;
      $folder = str_replace('assets/', '', $folder->Filename);
      $this->folder = rtrim($this->folder . $folder, '/') . '/';
    }
  }
346737
public function setLocation(string $location)
    {
        $dir = Directory::make($location, Directory::MAKE_DIRECTORY_EXISTS_OPEN);

        $old = $this->getPath();
        $new = $dir->getPath();

        if(rename($old, $new)) {
            $this->_location = $dir->getPath();
        }
    }
1346667
public function copy(string $newFolderPath): self
    {
        $newFolderPath = normalize_path($newFolderPath);

        if (!is_dir($newFolderPath)) {
            $newFolder = self::create($newFolderPath);
            if ($this->copyContent($newFolder->getPath())) {
                return $newFolder;
            }
            throw new FolderException('Cannot copy folder to the new folder path ('.$newFolderPath.') for unknown reasons');
        }
        throw new FolderException('Cannot copy the folder, because a folder with the same name and path ('.$newFolderPath.') already exists',
            FolderException::ALREADY_EXIST);
    }
234398
public function save(Folder $folder)
    {
        $em = $this->getEntityManager();
        $parent = $folder->getParent();

        $em->beginTransaction();

        try {
            if (!is_null($parent)) {
                $this->persistInOrderedTree($folder, $parent);
            } else {
                $em->persist($folder);
            }
            $em->commit();
            $em->flush();
        } catch (\Exception $e) {
            $em->rollback();

            throw $e;
        }
    }
227390
public function setPath(string $path)
    {
        $info = pathinfo($path);

        $this->setLocation($info["dirname"] ?? "");
        $this->setName($info["filename"] ?? "");
    }
477430
def set_folder(self, folder):
        
        self.folder = folder
        self.templates.directories[0] = folder
        self.app.root_path = folder
996307
public function setFolder(FileUploadFolder $folder) {
        if(!$this->setModified('folder', $folder)->isModified()) {
            return $this;
        }
        $this->folder = $folder;
        return $this;
    }
811822
public function setDirectory($directory)
    {
        $this->directory = $directory . DIRECTORY_SEPARATOR . $this->id;
        if (file_exists($this->directory) === false) {
            mkdir($this->directory, $this->fileMode, true);
        }
    }
439711
protected function setFolder($folder) {
        // Se a pasta existir, for uma pasta e puder ser escrita
        if (file_exists($folder) && is_dir($folder) && is_writable($folder)) {
            $this->folder = $folder;
        } else {
            trigger_error('Não foi possível acessar a pasta de cache', E_USER_ERROR);
        }
    }
333982
public static function SetDirectory($dir) {
    if (!is_dir($dir)) {
      if (!@\mkdir($dir, 0700, TRUE)) {
        throw new \InvalidArgumentException("dir $dir does not exist and could not be created");
      }
    }

    self::$DIR = realpath($dir);
  }
180568
protected function createDirectory($directory)
    {
        if (!$this->files->isDirectory($directory)) {
            $this->files->makeDirectory($directory, 0755, true);
        }
    }
995900
public function createFolder($cb, $folder, $parentFolder = null)
    {
        $this->onResponse->push($cb);
        if ($parentFolder) {
            $folder =  $parentFolder . '/' . $folder ;
        }
        $this->writeln(self::TAG_CREATEFOLDER . " CREATE ".$this->escapeString($folder));
    }
833243
protected function clearCacheFolder($folder)
    {
        $path = WINDWALKER_CACHE . '/' . $folder;

        if (is_dir($path)) {
            Folder::delete($path);
        } elseif (is_file($path)) {
            File::delete($path);
        }

        $this->out(sprintf('[Deleted] <info>%s</info>', $path));
    }
768093
public function setFolders($folders)
    {
        $this->set(self::KEY_FOLDERS, $folders);
        $this->provisioningMode = self::PROVISIONING_MODE_FOLDERS;
        return $this;
    }
881607
public function move(string $newFolderPath): self
    {
        $newFolderPath = normalize_path($newFolderPath);

        if (!is_dir($newFolderPath)) {
            if (rename($this->path, $newFolderPath)) {
                return new self($newFolderPath);
            }
            throw new FolderException('Cannot move folder to the new folder path ('.$newFolderPath.') for unknown reasons');
        }
        throw new FolderException('Cannot move the folder, because the new folder path ('.$newFolderPath.') already exists',
            FolderException::ALREADY_EXIST);
    }
1245407
def create_folder(self, folder):
        
        if folder.endswith("/"):
            folder = folder[:-1]
        if len(folder) < 1:
            raise Exception("Minimum folder name length = 1.")
        if not os.path.exists(folder):
            try:
                os.makedirs(folder)
            except Exception:
                pass
307041
protected function buildDir($definition, $folder="controllers"){
        $dir= "";
        if(! isset($definition['location'])){
            $dir= $this->app->context->getPathApp() . 'src/' . $folder . '/' . $definition['class'] . '.php';
        }else{
            $dir= $this->app->context->getPathRoot() . $definition['location'] . '/' . $definition['class'] . '.php';
        }
        return $dir;
    }