... @param name {string} 指定要加载的文件名称
19448
function(name, eagerCompile, cb) {
                if (name && name.raw) {
                    // this fixes autoescape for templates referenced in symbols
                    name = name.raw;
                }

                if (lib.isFunction(eagerCompile)) {
                    cb = eagerCompile;
                    eagerCompile = false;
                }

                if (typeof name !== 'string') {
                    throw new Error('template names must be a string: ' + name);
                }

                var tmpl = this.cache[name];

                if (tmpl) {
                    if (eagerCompile) {
                        tmpl.compile();
                    }

                    if (cb) {
                        cb(null, tmpl);
                    } else {
                        return tmpl;
                    }
                } else {
                    var syncResult;

                    lib.asyncIter(this.loaders, function(loader, i, next, done) {
                        function handle(src) {
                            if (src) {
                                done(src);
                            } else {
                                next();
                            }
                        }

                        if (loader.async) {
                            loader.getSource(name, function(err, src) {
                                if (err) {
                                    throw err;
                                }
                                handle(src);
                            });
                        } else {
                            handle(loader.getSource(name));
                        }
                    }, function(info) {
                        if (!info) {
                            var err = new Error('template not found: ' + name);
                            if (cb) {
                                cb(err);
                            } else {
                                throw err;
                            }
                        } else {
                            var tmpl = new Template(info.src, this,
                                info.path, eagerCompile);

                            if (!info.noCache) {
                                this.cache[name] = tmpl;
                            }

                            if (cb) {
                                cb(null, tmpl);
                            } else {
                                syncResult = tmpl;
                            }
                        }
                    }.bind(this));

                    return syncResult;
                }
            }
351044
function(name){
    this.doctype = doctypes[name.toLowerCase()] || '<!DOCTYPE ' + name + '>';
    this.terse = this.doctype.toLowerCase() == '<!doctype html>';
    this.xml = 0 == this.doctype.indexOf('<?xml');
  }
1327840
function(name) {
			var element = this.get(name);
			if (element) {
				this._updateSource('', element.fullRange());
				var ix = this._children.indexOf(element);
				if (~ix) {
					this._children.splice(ix, 1);
				}
			}
		}
505268
public void addName(final String name, int id) {
    this.name2idx.put(name, id);
    this.idx2name.put(id, name);
  }
260331
function addFile(filename) {
        if (ignoredPaths.contains(filename)) {
            return;
        }
        filename = fs.realpathSync(filename);
        if (added[filename]) {
            return;
        }
        files.push(filename);
        added[filename] = true;
    }
263964
function (name, factory, config) {
            name = addIndexAndRemoveJsExtFromName(name);

            var mods = Env.mods,
                module = mods[name];

            if (module && module.factory !== undefined) {
                S.log(name + ' is defined more than once', 'warn');
                return;
            }

            // 没有 use，静态载入的 add 可能执行
            Utils.createModuleInfo(name);

            module = mods[name];

            // 注意：通过 S.add(name[, factory[, config]]) 注册的代码，无论是页面中的代码，
            // 还是 js 文件里的代码，add 执行时，都意味着该模块已经 LOADED
            mix(module, {
                name: name,
                status: LOADED,
                factory: factory
            });

            mix(module, config);
        }
494533
public void add(AsciiString name, String value){
        if(name==null || value==null)
            return;
        Header head = entry(name, true);
        if(head.value==null)
            head.value = value;
        else{
            Header newHeader = newHeader(name);
            newHeader.value = value;
            Header tail = head.samePrev;
            tail.sameNext = newHeader;
            newHeader.samePrev = tail;
            head.samePrev = newHeader;
        }
        assert validateLinks();
    }
1101868
public void setName(String name) {

        String oufqn = getOufqn();
        if (oufqn != null) {
            if (!oufqn.endsWith("/")) {
                oufqn += "/";
            }
        } else {
            oufqn = "/";
        }
        m_project.setName(oufqn + name);

    }
545887
public static void add(Document document, String name) {
        Element element = findElement(document, name);

        AssertUtils.assertNotNull(element, "Failed to find element by name: " + name);

        add(element);
    }
1220372
public void add(String name, Object value) {
		if (value != null) {
			this.content.put(name, value);
		}
	}
1110043
function(name) {
    var idx, length, regexp,
      header = this.headers[Utils.headerize(name)],
      result = [];

    if (header) {
      length = header.length;
      for (idx = 0; idx < length; idx++) {
        result.push(header[idx]);
      }
      return result;
    } else {
      length = this.extraHeaders.length;
      regexp = new RegExp('^\\s*'+ name +'\\s*:','i');
      for (idx=0; idx<length; idx++) {
        header = this.extraHeaders[idx];
        if (regexp.test(header)) {
          result.push(header.substring(header.indexOf(':')+1).trim());
        }
      }
      return result;
    }
  }
553132
void addFileName(final String fileName) {
      writeLock.lock();
      try {
         final FileListCacheValue fileList = getFileList();
         boolean done = fileList.add(fileName);
         if (done) {
            updateFileList(fileList);
            if (trace)
               log.trace("Updated file listing: added " + fileName);
         }
      } finally {
         writeLock.unlock();
      }
   }
496157
function(name) {
    this.profile = trait(Object.create(this.schema), {
      context: this.context
    });

    var profile_dir = this.profile_dir = node_path.join(this.path, name);

    if (!fs.isDir(profile_dir)) {
      fs.mkdir(profile_dir);
    }

    var profile_file = this.profile_file = node_path.join(profile_dir, 'config');

    if (!fs.isFile(profile_file)) {
      fs.write(profile_file, '');

    } else {
      this.reload();
    }
  }
47699
function(name, config) {
            config = config || {};
            config = _.defaults(config, {
                loader: configs.resources.loader
            });
            config = _.extend(config, {
                namespace: name
            });
            Resources.namespaces[name] = config;
        }
463837
function(name) {
    name = name || '';

    // TODO optimize with RegExp

    var nameChain = name.split('.');
    for(var i=0; i<nameChain.length; i++) {
      if(!nameChain[i].match(/[a-zA-Z0-9_]+/)) {
        return false;
      }
    }

    return true;
  }
208152
function(location, name) {
  this.location = location;
  this.name = name;
  if (typeof localStorage === 'undefined' || localStorage === null) {
    if (this.name) {
      this.name = require('sanitize-filename')(this.name, {replacement: '_'});
      require('mkdirp').sync(this.location);
    }
  }
  else {
    this.localStorage = localStorage;
  }
  this.path = this.location;
  if (this.name)
    this.path += '/' + this.name;
}
263416
function(name) {
    // Check the name ends with a /
    if (name.slice(-1) != "/") {
        name += "/"; // IE doesn't like substr(-1)
    }

    // Does this folder already exist?
    if (!this.files[name]) {
        fileAdd.call(this, name, null, {
            dir: true
        });
    }
    return this.files[name];
}