Constructs a new FolderView object.

@class
@name orion.FolderView
483732
function FolderView(options) {
		this.idCount = ID_COUNT++;
		this._parent = options.parent;
		this._metadata = options.metadata;
		this.menuBar = options.menuBar;
		this.fileClient = options.fileService;
		this.progress = options.progressService;
		this.serviceRegistry = options.serviceRegistry;
		this.commandRegistry = options.commandRegistry;
		this.contentTypeRegistry = options.contentTypeRegistry;
		this.editorInputManager = options.inputManager;
		this.preferences = options.preferences;
		this.generalPrefs = new mGeneralPrefs.GeneralPreferences(this.preferences);
		this.showProjectView = options.showProjectView === undefined ? !options.metadata.Projects : options.showProjectView;
		this.showFolderNav = true;
		this._init();
	}
383311
function FolderPath(value) {
  if (!(this instanceof FolderPath)) {
    return new FolderPath(value);
  }
  if (Array.isArray(value)) {
    this.value = value;
  } else if (typeof value === 'string') {
    if (value.match('^https?:\/\/')) {
      this.value = parseName(value);
    } else {
      this.value = value.split('/').filter(Boolean);
    }
  } else {
    this.value = [];
  }
}
956378
function (oViewClass) {
						var mViewParameters = {
							id: id ? getId(oView, node, id) : undefined,
							xmlNode: node,
							containingView: oView._oContainingView,
							processingMode: oView._sProcessingMode // add processing mode, so it can be propagated to subviews inside the HTML block
						};
						// running with owner component
						if (oView.fnScopedRunWithOwner) {
							return oView.fnScopedRunWithOwner(function () {
								return new oViewClass(mViewParameters);
							});
						}
						// no owner component
						// (or fully sync path, which handles the owner propagation on a higher level)
						return new oViewClass(mViewParameters);
					}
1100987
function createTree (context, folder) {
  const tree = []
  const files = []

  let directoryContents = []

  try {
    directoryContents = fs.readdirSync(path.join(context, folder))
  } catch (error) {
    // Throw error if it’s not a permissions error
    if (error.code !== 'EACCESS') {
      throw error
    }
  }

  // Folders first
  directoryContents
    .filter(item => {
      return fs
        .lstatSync(path.join(context, folder, item))
        .isDirectory()
    })
    .forEach(item => {
      const children = createTree(context, path.join(folder, item))

      // Don’t add current directory to tree if it has no children
      if (children.tree.length) {
        tree.push({
          name: formatName(item),
          children: children.tree
        })
      }

      files.push(...children.files)
    })

  // Files second
  directoryContents
    .filter(item => item.endsWith('.njk'))
    .forEach(item => {
      const basename = path.basename(item, '.njk')
      const filePath = formatPath(folder, item)
      const configPath = path.join(context, folder, basename + '.json')

      let config

      try {
        config = JSON.parse(fs.readFileSync(configPath))
      } catch (error) {
        config = {}
      }

      // Don’t add current component to tree if it’s hidden
      if (config.hidden) {
        return
      }

      tree.push({
        name: formatName(basename),
        path: filePath.slice(0, -4),
        config
      })

      files.push(filePath)
    })

  return { files, tree }
}
439354
public final void addFolder(@NotNull final Folder folder) {
        Contract.requireArgNotNull("folder", folder);
        if (folders == null) {
            folders = new ArrayList<>();
        }
        folders.add(folder);
    }
1094712
@Override
    protected void initViews(List<View> views) throws IOException {
        BranchListView v = new BranchListView("All", this);
        v.setIncludeRegex(".*");
        views.add(v);
        v.save();
    }
1061114
protected function createFolders()
    {
        $dir    = null;
        $target = $this->getTargetDirectory();

        /** @noinspection IsEmptyFunctionUsageInspection */
        if (!empty($target)) {
            $dir = rtrim($target, '/') . DIRECTORY_SEPARATOR;
            $this->setTarget($dir);
        }

        if ($dir !== null && !is_dir($dir) && $this->isAllowCreateFolders()) {
            /** @noinspection NotOptimalIfConditionsInspection */
            /** @noinspection PhpUsageOfSilenceOperatorInspection */
            if (!@mkdir($dir, 0777, true) && !is_dir($dir)) {
                throw new Exception\NoSuchDirectoryException(
                    sprintf('Directory %s does not exists.', $dir)
                );
            }
        }
    }
159613
public function createFolder($folderName) {
		
		// prefix folder path, when realpath fails (e.g. does not exist)

		if(!($path = realpath($folderName))) {

			$path = $this->path . $folderName;

		}
		
		// throw exception when $folderName cannot be established as subdirectory of current folder
		
		else if (strpos($path, $this->path) !== 0) {
			
			throw new FilesystemFolderException(sprintf("Folder %s cannot be created within folder %s.", $folderName, $this->path));
			
		}
		
		// recursively create folder(s) when when path not already exists
		
		if(!is_dir($path)) {

			if(!@mkdir($path, 0777, TRUE)) {
				throw new FilesystemFolderException(sprintf("Folder %s could not be created!", $path));
			}
			else {
				chmod($path, 0777);
			}

			$path = realpath($path);
		}

		return self::getInstance($path);

	}
647588
public function actionFolderCreate()
    {
        $this->checkRouteAccess(self::PERMISSION_ROUTE);
        
        $folderName = Yii::$app->request->post('folderName', null);
        $parentFolderId = Yii::$app->request->post('parentFolderId', 0);
        $response = Yii::$app->storage->addFolder($folderName, $parentFolderId);
        $this->flushApiCache();
        
        return $response;
    }
835676
function View(bytes, elementType) {
    if (!(this instanceof View))
        return new View(bytes, elementType);
    this.bytes = bytes;
    this.elementType = elementType;
}
1004359
def create_child_folder(self, folder_name):
        

        if not folder_name:
            return None

        if self.root:
            url = self.build_url(self._endpoints.get('root_folders'))
        else:
            url = self.build_url(
                self._endpoints.get('child_folders').format(id=self.folder_id))

        response = self.con.post(url,
                                 data={self._cc('displayName'): folder_name})
        if not response:
            return None

        folder = response.json()

        # Everything received from cloud must be passed as self._cloud_data_key
        return self.__class__(parent=self, **{self._cloud_data_key: folder})
320726
def project_new_folder(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/newFolder' % object_id, input_params, always_retry=always_retry, **kwargs)
104764
def new_workspace(self, name=None, layout=None, workspace_id=None, index=None) -> WorkspaceLayout.WorkspaceLayout:
        
        workspace = WorkspaceLayout.WorkspaceLayout()
        self.document_model.insert_workspace(index if index is not None else len(self.document_model.workspaces), workspace)
        d = create_image_desc()
        d["selected"] = True
        workspace.layout = layout if layout is not None else d
        workspace.name = name if name is not None else _("Workspace")
        if workspace_id:
            workspace.workspace_id = workspace_id
        return workspace
792421
function createIndex(dirPath) {
    const dirName = path.basename(dirPath)
    return format(`/** DON'T EDIT THIS FILE; was created by scripts. */
    "use strict"

    module.exports = {
        ${fs
            .readdirSync(dirPath)
            .map(file => path.basename(file, ".js"))
            .map(id => `"${id}": require("./${dirName}/${id}"),`)
            .join("\n    ")}
    }
    `)
}
338570
private ImageView createBlankSpace() {
        ImageView view = new ImageView(getContext());
        TableRow.LayoutParams params = new TableRow.LayoutParams(mSwatchLength, mSwatchLength);
        params.setMargins(mMarginSize, mMarginSize, mMarginSize, mMarginSize);
        view.setLayoutParams(params);
        return view;
    }
659873
def upload(cls):
        
        cls._check_folder()
        os.chdir(cls.VIEWS_PATH)
        buckets = dict()
        # iterate local folders
        for bucket_name in os.listdir(cls.VIEWS_PATH):
            if not os.path.isdir(bucket_name):
                continue
            # get bucket object
            if bucket_name not in buckets:
                try:
                    bucket = Connection.bucket(bucket_name)
                except BucketNotFoundError as why:
                    print("[WARNING] %s" % str(why))
                    continue
                else:
                    buckets[bucket_name] = bucket
            else:
                bucket = buckets[bucket_name]
            # go through design docs
            for ddoc_name in os.listdir(bucket_name):
                views_path = '%s/%s/views' % (bucket_name, ddoc_name)
                spatial_path = '%s/%s/spatial' % (bucket_name, ddoc_name)
                if not (os.path.exists(views_path) and os.path.isdir(views_path)) and \
                   not (os.path.exists(spatial_path) and os.path.isdir(spatial_path)):
                    continue
                # initialize design doc
                new_ddoc = {
                    'views': {},
                    'spatial': {},
                }
                # map and reduces
                if os.path.exists(views_path) and os.path.isdir(views_path):
                    for filename in os.listdir(views_path):
                        if not os.path.isfile('%s/%s' % (views_path, filename)) or \
                           not filename.endswith(('.map.js', '.reduce.js')):
                            continue
                        view_name, view_type, js = filename.rsplit('.', 2)
                        if view_name not in new_ddoc['views']:
                            new_ddoc['views'][view_name] = {}
                        with open('%s/%s' % (views_path, filename), 'r') as f:
                            new_ddoc['views'][view_name][view_type] = f.read()
                # spatial views
                if os.path.exists(spatial_path) and os.path.isdir(spatial_path):
                    for filename in os.listdir(spatial_path):
                        if not os.path.isfile('%s/%s' % (spatial_path, filename)) or \
                           not filename.endswith('.spatial.js'):
                            continue
                        view_name = filename.rsplit('.', 2)[0]
                        with open('%s/%s' % (spatial_path, filename), 'r') as f:
                            new_ddoc['spatial'][view_name] = f.read()
                bucket['_design/%s' % ddoc_name] = new_ddoc
                print('Uploaded design document: %s' % ddoc_name)
        pass
404943
function UMLObjectView() {
        UMLGeneralNodeView.apply(this, arguments);
        this.containerChangeable = true;

        /** @member {UMLSlotCompartmentView} */
        this.slotCompartment = new UMLSlotCompartmentView();
        this.slotCompartment.selectable = Core.SK_PROPAGATE;
        this.slotCompartment.parentStyle = true;
        this.addSubView(this.slotCompartment);

        this.fillColor = PreferenceManager.get("uml.object.fillColor", "#ffffff") || PreferenceManager.get("view.fillColor", "#ffffff");
    }