Add a source folder in the current projecT.

@param path the source folder path.
172241
protected void addSourceFolder(String path) {
		final List<String> existingFolders1 = this.project.getCompileSourceRoots();
		final List<String> existingFolders2 = this.project.getTestCompileSourceRoots();
		if (!existingFolders1.contains(path) && !existingFolders2.contains(path)) {
			getLog().info(MessageFormat.format(Messages.InitializeMojo_0, path));
			this.session.getCurrentProject().addCompileSourceRoot(path);
		} else {
			getLog().info(MessageFormat.format(Messages.InitializeMojo_1, path));
		}
	}
785714
public void addFile(String path, InputStream inputStream, String contentType) throws IOException {
    String fullPath = buildJcrPathForZip(path);
    writeBinaryFile(fullPath, inputStream);

    if (StringUtils.isNotEmpty(contentType)) {
      String mimeType = StringUtils.substringBefore(contentType, CONTENT_TYPE_CHARSET_EXTENSION);
      String encoding = StringUtils.substringAfter(contentType, CONTENT_TYPE_CHARSET_EXTENSION);

      String fullPathMetadata = fullPath + DOT_DIR_FOLDER + "/" + DOT_CONTENT_XML;
      Document doc = xmlContentBuilder.buildNtFile(mimeType, encoding);
      writeXmlDocument(fullPathMetadata, doc);
    }
  }
675816
public ThreadContextClassLoaderBuilder addPath(final String path) {

        // Check sanity
        Validate.notEmpty(path, "path");

        // Convert to an URL, and delegate.
        final URL anUrl;
        try {
            anUrl = new File(path).toURI().toURL();
        } catch (MalformedURLException e) {
            throw new IllegalArgumentException("Could not convert path [" + path + "] to an URL.", e);
        }

        // Delegate
        return addURL(anUrl);
    }
332487
def add_project(self, path):
        

        if not foundations.common.path_exists(path):
            return False

        path = os.path.normpath(path)
        if self.__model.get_project_nodes(path):
            self.__engine.notifications_manager.warnify(
                "{0} | '{1}' project is already opened!".format(self.__class__.__name__, path))
            return False

        LOGGER.info("{0} | Adding '{1}' project!".format(self.__class__.__name__, path))
        project_node = self.__model.register_project(path)
        if not project_node:
            return False

        self.__model.set_project_nodes(project_node)
        return True
724976
private synchronized void addResolved( String path )
    {
        for ( int index = path.lastIndexOf( '/' ); index > 0; index = path.lastIndexOf( '/' ) )
        {
            String name = path.substring( index + 1 );
            path = path.substring( 0, index );
            Map<String, Artifact> artifactMapper = this.children.get( path );
            if ( artifactMapper == null )
            {
                artifactMapper = new HashMap<String, Artifact>();
                this.children.put( path, artifactMapper );
            }
            artifactMapper.put( name, null );
        }
        if ( !StringUtils.isEmpty( path ) )
        {
            Map<String, Artifact> artifactMapper = this.children.get( "" );
            if ( artifactMapper == null )
            {
                artifactMapper = new HashMap<String, Artifact>();
                this.children.put( "", artifactMapper );
            }
            artifactMapper.put( path, null );
        }
    }
198439
function Project(path) {
  path = path || PWD;
  this.root = '';
  this.storage = '';
  this.ignore = [];
  this.resolvePaths(path);
}
570219
public UrlBuilder addPath(String path) {
		if (path.charAt(0) == '/' && baseUrl.endsWith("/")) {
			baseUrl = baseUrl + path.substring(1);
		} else {
			baseUrl = baseUrl + path;
		}
		return this;
	}
681500
public void addSourceFolder(File folder) {
		Assert.notNull(folder, "Folder must not be null");
		Assert.isTrue(!folder.isFile(), "Folder '" + folder + "' must not be a file");
		synchronized (this.monitor) {
			checkNotStarted();
			this.folders.put(folder, null);
		}
	}
1281843
private static void addCurrentWorkingDir2Classpath(String path2Added) {

        // Add the conf dir to the classpath
        // Chain the current thread classloader
        URLClassLoader urlClassLoader;
        try {
            urlClassLoader = new URLClassLoader(new URL[] {new File(path2Added).toURI().toURL()},
                    loader);
            // Replace the thread classloader - assumes
            // you have permissions to do so
            Thread.currentThread().setContextClassLoader(urlClassLoader);
        } catch (Exception e) {
            LOGGER.warn(e.toString());
        }
    }
93502
public void addPath(String path) {
        if (path == null) {
            return;
        }
        String[] pathComponents = path.split("/");
        TrieNode parent = rootNode;
        String part = null;
        if (pathComponents.length <= 1) {
            throw new IllegalArgumentException("Invalid path " + path);
        }
        for (int i=1; i<pathComponents.length; i++) {
            part = pathComponents[i];
            if (parent.getChild(part) == null) {
                parent.addChild(part, new TrieNode(parent));
            }
            parent = parent.getChild(part);
        }
        parent.setProperty(true);
    }
1094627
def add_path(self, path):
        # type: (_BaseSourcePaths, str) -> None
        
        if isinstance(path, pathlib.Path):
            self._paths.append(path)
        else:
            self._paths.append(pathlib.Path(path))
173654
protected function setSourcePath($path)
    {
        if ($this->sourcePath === self::BASE_PATH) {
            $this->sourcePath = $path;
        } elseif ($this->sourcePath === self::EMPTY_PATH) {
            $this->sourcePath = null;
        }
    }
1328946
public final void addClassPathEntry (@Nullable final File path)
  {
    if (path != null)
      m_aClassPathEntries.add (path.getAbsolutePath ());
  }
273115
public Resource addPath(String path)
        throws IOException,MalformedURLException
    {
        if (path==null)
            return null;

        path = URI.canonicalPath(path);

        return newResource(URI.addPaths(_url.toExternalForm(),path));
    }
354210
protected void addLinkedResources(String path, GeneratorContext context, FilePathMapping fMapping) {
		addLinkedResources(path, context, Arrays.asList(fMapping));
	}
873597
public void addPath(String path, Mode mode)
    {
        PathHolder pathHolder = new PathHolder(path, mode, 0);
        activePaths.put(path, pathHolder);
        schedule(pathHolder, reapingThresholdMs);
    }
1156640
public void addFolder(String folder) {

        m_searchObject.addFolder(folder);
        m_searchObjectChanged = true;
        ValueChangeEvent.fire(this, m_searchObject);
    }