filename in the index file.
549232
private String fileStatusInIndex(Path harPath) throws IOException {
    // read the index file
    int hashCode = getHarHash(harPath.toString());
    // get the master index to find the pos
    // in the index file
    FSDataInputStream in = fs.open(masterIndex);
    FileStatus masterStat = fs.getFileStatus(masterIndex);
    LineReader lin = new LineReader(in, getConf());
    Text line = new Text();
    long read = lin.readLine(line);
   //ignore the first line. this is the header of the index files
    String[] readStr = null;
    List<Store> stores = new ArrayList<Store>();
    while(read < masterStat.getLen()) {
      int b = lin.readLine(line);
      read += b;
      readStr = line.toString().split(" ");
      int startHash = Integer.parseInt(readStr[0]);
      int endHash  = Integer.parseInt(readStr[1]);
      if (startHash <= hashCode && hashCode <= endHash) {
        stores.add(new Store(Long.parseLong(readStr[2]),
            Long.parseLong(readStr[3]), startHash,
            endHash));
      }
      line.clear();
    }
    try {
      lin.close();
    } catch(IOException io){
      // do nothing just a read.
    }
    FSDataInputStream aIn = fs.open(archiveIndex);
    LineReader aLin;
    String retStr = null;
    // now start reading the real index file
    for (Store s: stores) {
      read = 0;
      aIn.seek(s.begin);
      aLin = new LineReader(aIn, getConf());
      while (read + s.begin < s.end) {
        int tmp = aLin.readLine(line);
        read += tmp;
        String lineFeed = line.toString();
        String[] parsed = lineFeed.split(" ");
        parsed[0] = decodeFileName(parsed[0]);
        if (harPath.compareTo(new Path(parsed[0])) == 0) {
          // bingo!
          retStr = lineFeed;
          break;
        }
        line.clear();
      }
      if (retStr != null)
        break;
    }
    try {
      aIn.close();
    } catch(IOException io) {
      //do nothing
    }
    return retStr;
  }
1124837
function getFilenameWithoutExtension(filename) {
        var index = filename.lastIndexOf(".");
        return index === -1 ? filename : filename.slice(0, index);
    }
1102000
def file_name(self, value):
        
        if isinstance(value, FileName):
            self._file_name = value
        else:
            self._file_name = FileName(value)
603640
def getInstNameByIndex(self, colId, *indices):
        """"""
        return self.name + (colId,) + self.getInstIdFromIndices(*indices)
1145141
def fileInfo(self, index):
        
        return self._fs_model_source.fileInfo(
            self._fs_model_proxy.mapToSource(index))
82486
private void mapAndRememberIndexFile(File index) {
        MappedFileReader idxFileReader = null;
        try {
            idxFileReader = new MappedFileReader(index);
            mappedIndexFileReader.add(idxFileReader);
            indexFiles.add(idxFileReader.map());
        } catch(IOException e) {
            logger.error("Error mmapping " + index, e);
        }
    }
1202100
def searchNamesIndex(self, nameIndex, nameData, searchString, category="", math=False, game=False, extension="", searchFiles=False):
		""""""
		nameData = {}
		try:
			nameFile = open(nameIndex, 'rt')
		except IOError:
			self.repo.printd("Error: Unable to read index file " + self.fileIndex)
			return None
			
		count = 1
		for line in nameFile:
			count += 1
			if searchString.lower() in line.lower():
				#Extension argument
				if extension in line:
					nameData[count] = line[:len(line) - 1]
				else:
					nameData[count] = None
				#category arg
				if category in line and extension in line:
					nameData[count] = line[:len(line) - 1]
				else:
					nameData[count] = None
				#Both game and math
				if (game and math):
					if ("/games/" in line or "/math/" in line or "/science" in line):
						nameData[count] = line[:len(line) - 1]
					else:
						nameData[count] = None
				#Game option switch
				elif game:
					if "/games/" in line:
						nameData[count] = line[:len(line) - 1]
					else:
						nameData[count] = None
				#Math option switch
				elif math:
					if ("/math/" in line or "/science/" in line):
						nameData[count] = line[:len(line) - 1]
					else:
						nameData[count] = None

		#Close the name index and return
		nameFile.close()
		return nameData
206158
def filenameToModname(self, filename):
        """"""
        for ext in reversed(self._exts):
            if filename.endswith(ext):
                filename = filename[:-len(ext)]
                break
        else:
            self.warn(filename, '%s: unknown file name extension', filename)
        filename = os.path.abspath(filename)
        elements = filename.split(os.path.sep)
        modname = []
        while elements:
            modname.append(elements[-1])
            del elements[-1]
            if not os.path.exists(os.path.sep.join(elements + ['__init__.py'])):
                break
        modname.reverse()
        modname = ".".join(modname)
        return modname
334051
def archive_filenames(self):
        """"""
        try:
            return _bfd.archive_list_filenames(self._ptr)
        except TypeError, err:
            raise BfdException(err)
1350307
def _index_file(self):
        
        with self.filename.open() as fd:
            data = fd.read()

        ident = "Contour in frame"
        self._data = data.split(ident)[1:]
        self._initialized = True
527182
private String getSuffix(String fileName) {

        int index = fileName.lastIndexOf(".");
        if (index > 0) {
            return fileName.substring(index);
        } else {
            return fileName;
        }
    }
244289
function getFilename( file, postfix ) {
    let filenameParts;
    if ( typeof file === 'object' && file !== null && file.name ) {
        postfix = postfix || '';
        filenameParts = file.name.split( '.' );
        if ( filenameParts.length > 1 ) {
            filenameParts[ filenameParts.length - 2 ] += postfix;
        } else if ( filenameParts.length === 1 ) {
            filenameParts[ 0 ] += postfix;
        }
        return filenameParts.join( '.' );
    }
    return '';
}
110506
def safe_filename(file_name, sep='_', default=None, extension=None):
    """"""
    if file_name is None:
        return decode_path(default)

    file_name = decode_path(file_name)
    file_name = os.path.basename(file_name)
    file_name, _extension = os.path.splitext(file_name)
    file_name = _safe_name(file_name, sep=sep)
    if file_name is None:
        return decode_path(default)
    file_name = file_name[:MAX_LENGTH]
    extension = _safe_name(extension or _extension, sep=sep)
    if extension is not None:
        file_name = '.'.join((file_name, extension))
        file_name = file_name[:MAX_LENGTH]
    return file_name
466097
private function ensureFilesIndex()
    {
        foreach ($this->filesCollection->listIndexes() as $index) {
            if ($index->getKey() === ['filename' => 1, 'uploadDate' => 1]) {
                return;
            }
        }

        $this->filesCollection->createIndex(['filename' => 1, 'uploadDate' => 1]);
    }
245175
def get_selected_filenames(self):
        """"""
        if self.selectionMode() == self.ExtendedSelection:
            if self.selectionModel() is None:
                return []
            return [self.get_filename(idx) for idx in 
                    self.selectionModel().selectedRows()]
        else:
            return [self.get_filename(self.currentIndex())]
59904
def index_filename_rel_other_index(self, other: str) -> str:
        
        return relpath(self.index_filename, start=dirname(other))
51090
def _build_index():
    
    global _module_file_index
    _module_file_index = {
        mod.__file__: mod.__name__
        for mod in sys.modules.values()
        if hasattr(mod, '__file__') and hasattr(mod, '__name__')
    }