Changes the file folder to look at

        :param folder: str [images, assets]
        :return: None
512445
def set_folder(self, folder='assets'):
        
        folder = folder.replace('/', '.')
        self._endpoint = 'files/{folder}'.format(folder=folder)
1157078
def move_images(self, image_directory):
        

        image_paths = glob(image_directory + "/**/*.png", recursive=True)
        for image_path in image_paths:
            destination = image_path.replace("\\image\\", "\\")
            shutil.move(image_path, destination)
        image_folders = glob(image_directory + "/**/image", recursive=True)
        for image_folder in image_folders:
            os.removedirs(image_folder)
474984
def set_ignores(self, folder, *patterns):
        
        if not patterns:
            return {}
        data = {'ignore': list(patterns)}
        return self.post('ignores', params={'folder': folder}, data=data)
265082
def remove_unused_directories(src_folder, categories):
  
  files = os.listdir(src_folder)
  os.mkdir("unused")
  for name in files:
    full_path = os.path.join(src_folder, name)
    if os.path.isdir(full_path):
      if not( name in categories or name == "_background_noise_"):
        newPath = os.path.join("unused", name)
        print("moving: ", full_path, "-->", newPath)
        shutil.move(full_path, newPath)
85849
private void loadFolder(File folder) {
        m_logger.info("Scanning for files in folder: {}", folder.getAbsolutePath());
        File[] files = folder.listFiles();
        if (files == null || files.length == 0) {
            m_logger.error("No files found in folder: {}", folder.getAbsolutePath());
            return;
        }
        
        for (File file : files) {
            String fileName = file.getName().toLowerCase();
            if (!fileName.endsWith(".csv") && !fileName.endsWith(".zip")) {
                continue;
            }
            TableDefinition tableDef = determineTableFromFileName(file.getName());
            if (tableDef == null) {
                m_logger.error("Ignoring file; unknown corresponding table: {}", file.getName());
                continue;
            }
            try {
                if (fileName.endsWith(".csv")) {
                    loadCSVFile(tableDef, file);
                } else  {
                    loadZIPFile(tableDef, file);
                }
            } catch (IOException ex) {
                m_logger.error("I/O error scanning file '{}': {}", file.getName(), ex);
            }
        }
    }
384819
public void setScreenshotFolder(final File folder) {
		this.directory = folder;
		boolean created = directory.mkdirs();
		LOG.info("Screenshot folder created succsessfully: " + created);
	}
54866
def _set_up_savefolder(self):
        
        if not os.path.isdir(self.cells_path):
            os.mkdir(self.cells_path)

        if not os.path.isdir(self.figures_path):
            os.mkdir(self.figures_path)

        if not os.path.isdir(self.populations_path):
            os.mkdir(self.populations_path)
183567
def check_create_folder(folder_path):
    
    if not os.path.exists(folder_path):
        os.makedirs(folder_path)

    return folder_path
618340
def change_dir(self, session, path):
        
        if path == "-":
            # Previous directory
            path = self._previous_path or "."

        try:
            previous = os.getcwd()
            os.chdir(path)
        except IOError as ex:
            # Can't change directory
            session.write_line("Error changing directory: {0}", ex)
        else:
            # Store previous path
            self._previous_path = previous
            session.write_line(os.getcwd())
1043958
def rename_gallery_folder(self, old_folder_name, new_folder_name, scope='content/write'):
        
        return _put(
            token=self.oauth.get_user_token(scope),
            uri='/user/media/' + urllib.quote(old_folder_name),
            data=new_folder_name
        )
1359275
def _interact_with_folder(self, output_folder, action):
        
        if not action in ('r', 'w'):
            raise ValueError("action must be either 'r' or 'w'.")
        for key, item in self.__dict__.items():
            if isinstance(item, dict):
                for side in ("left", "right"):
                    filename = os.path.join(output_folder,
                                            "{}_{}.npy".format(key, side))
                    if action == 'w':
                        np.save(filename, self.__dict__[key][side])
                    else:
                        self.__dict__[key][side] = np.load(filename)
            else:
                filename = os.path.join(output_folder, "{}.npy".format(key))
                if action == 'w':
                    np.save(filename, self.__dict__[key])
                else:
                    self.__dict__[key] = np.load(filename)
1228241
def modify_request(self, request):
        
        filename = URL.build(path=request.match_info['filename'], encoded=True).path
        raw_path = self._directory.joinpath(filename)
        try:
            filepath = raw_path.resolve()
            if not filepath.exists():
                # simulate strict=True for python 3.6 which is not permitted with 3.5
                raise FileNotFoundError()
        except FileNotFoundError:
            try:
                html_file = raw_path.with_name(raw_path.name + '.html').resolve().relative_to(self._directory)
            except (FileNotFoundError, ValueError):
                pass
            else:
                request.match_info['filename'] = str(html_file)
        else:
            if filepath.is_dir():
                index_file = filepath / 'index.html'
                if index_file.exists():
                    try:
                        request.match_info['filename'] = str(index_file.relative_to(self._directory))
                    except ValueError:
                        # path is not not relative to self._directory
                        pass
815580
def delete_folder(self, folder_id, folder_etag=None, recursive=None):
		''''''
		return self( join('folders', folder_id),
			dict(recursive=recursive), method='delete',
			headers={'If-Match': folder_etag} if folder_etag else dict() )
1038163
def replace_folder(path):
    """"""
    if os.path.exists(path):
        shutil.rmtree(path)
        os.makedirs(path)
    else:
        os.makedirs(path)
1156640
public void addFolder(String folder) {

        m_searchObject.addFolder(folder);
        m_searchObjectChanged = true;
        ValueChangeEvent.fire(this, m_searchObject);
    }
1240720
def currentFolder(self, value):
        """"""
        if value in self.folders:
            if value.lower() != 'root':
                self._currentFolder = value
                self._location = "%s/%s" % (self.root, value)
            else:
                self._currentFolder = value
                self._location = self.root
            self.__init(folder=value)
1302352
def set(self, folder: str, subscribed: bool) -> None:
        """"""
        if subscribed:
            self.add(folder)
        else:
            self.remove(folder)