Adds a new constant for this project.

        The constant will be available for use in Jamfile
        module for this project. If 'path' is true,
        the constant will be interpreted relatively
        to the location of project.
516140
def add_constant(self, name, value, path=0):
        
        assert isinstance(name, basestring)
        assert is_iterable_typed(value, basestring)
        assert isinstance(path, int)  # will also match bools
        if path:
            l = self.location_
            if not l:
                # Project corresponding to config files do not have
                # 'location' attribute, but do have source location.
                # It might be more reasonable to make every project have
                # a location and use some other approach to prevent buildable
                # targets in config files, but that's for later.
                l = self.get('source-location')

            value = os.path.join(l, value[0])
            # Now make the value absolute path. Constants should be in
            # platform-native form.
            value = [os.path.normpath(os.path.join(os.getcwd(), value))]

        self.constants_[name] = value
        bjam.call("set-variable", self.project_module(), name, value)
1185908
def add(path, msg = "", options = {})
      exit_status = 0
      dir  = File.realpath(File.dirname(path))
      root = rootdir(path)
      relative_path_to_root = Pathname.new( File.realpath(path) ).relative_path_from Pathname.new(root)
      real_msg = ((msg.empty?) ? "add '#{relative_path_to_root}'" : msg)
      opts = '-f' if options[:force]
      Dir.chdir( dir ) do
        exit_status = run %(
                  git add #{opts} #{path}
                  git commit -s -m "#{real_msg}" #{path}
                )
      end
      exit_status.to_i
    end
1157662
public void addSourcePath(File sourcePath) {
		if (this.sourcePath == null) {
			this.sourcePath = new ArrayList<>();
		}
		this.sourcePath.add(sourcePath);
	}
983280
private void addSourceRoot (final File directory)
  {
    if (this.project != null)
    {
      getLog ().debug ("Adding compile source root: " + directory);
      this.project.addCompileSourceRoot (directory.getAbsolutePath ());
    }
  }
210147
def add_subproject(self, fname, conf_path):
        """"""
        config = Config(conf_file=conf_path)
        proj = Project(self.app,
                       dependency_map=self.dependency_map)
        proj.parse_name_from_config(config)
        proj.parse_config(config)
        proj.setup()
        self.subprojects[fname] = proj
1084930
public void addFile(String path, File file) throws IOException {
    addFile(path, file, null);
  }
305535
public T addFile(final String name, final List<String> path, final byte[] newHash, final boolean isDirectory) {
        return addFile(name, path, newHash, isDirectory, null);
    }
1004957
def _append_path(new_path):  # type: (str) -> None
    
    for path in sys.path:
        path = os.path.abspath(path)
        if new_path == path:
            return
    sys.path.append(new_path)
617003
def add(self, **kwargs):
        """"""
        if "path" in kwargs:
            path = kwargs["path"]
            if isinstance(path, bytes):
                path = String(path)
            if not path[0].startswith("/"):
                paths = self.normalize_paths(self.path, path)
            else:
                paths = self.normalize_paths(path)
            kwargs["path"] = "/".join(paths)
        return self.create(self, **kwargs)
374114
function add() {
        var root = FileUtils.stripTrailingSlash(ProjectManager.getProjectRoot().fullPath),
            recentProjects = getRecentProjects(),
            index = recentProjects.indexOf(root);

        if (index !== -1) {
            recentProjects.splice(index, 1);
        }
        recentProjects.unshift(root);
        if (recentProjects.length > MAX_PROJECTS) {
            recentProjects = recentProjects.slice(0, MAX_PROJECTS);
        }
        PreferencesManager.setViewState("recentProjects", recentProjects);
    }
50281
def add(self, rule, method, target, name=None, static=False):
        '''  '''
        if static:
            depr("Use a backslash to escape ':' in routes.") # 0.9
            rule = rule.replace(':','\\:')

        if rule in self.routes:
            self.routes[rule][method.upper()] = target
        else:
            self.routes[rule] = {method.upper(): target}
            self.rules.append(rule)
            if self.static or self.dynamic: # Clear precompiler cache.
                self.static, self.dynamic = {}, {}
        if name:
            self.named[name] = (rule, None)
624946
def add(self, path):
        """"""
        
        # sys.path always has absolute paths.
        path = os.path.abspath(path)
        
        # It must exist.
        if not os.path.exists(path):
            return
        
        # It must not already be in sys.path.
        if path in sys.path:
            return

        if self.index is not None:
            sys.path.insert(self.index, path)
            self.index += 1
        else:
            sys.path.append(path)
1245746
private void addSource() {

    	// TODO this should be shared between here and IDLReader
    	File generatedSources = new File(getBaseDir(), generatedSourceDir);

        this.getProject().addCompileSourceRoot( generatedSources.getAbsolutePath() );
        this.getLog().debug( "Source directory " + generatedSources + " added." );
	}
284873
def add(self, key, value):
        
        self.configfile.add(self.name, key, value)
121219
public Metadata add(String path, String value) {
        this.values.add(this.pathToProperty(path), value);
        this.addOp("add", path, value);
        return this;
    }
70005
def load_path(self, path):
        

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

        if os.path.isfile(path):
            if path in self.list_files():
                self.set_current_editor(path)
            else:
                self.load_file(path)
        else:
            if not path in self.list_projects():
                self.add_project(path)
        return True
610747
def _addconfig(config, *paths):
    """"""

    for path in paths:
        if path is not None and exists(path):
            config.append(path)