Saves absPath -> filename mapping in the map
@param path
321385
function mapAllNames(path) {
    log("[%s] Mapping %s", self.parentModuleName, path);
    fs.readdirSync(path).forEach(function(p){
      var absPath = PATH.resolve(path+PATH.sep+p);
      var lstat = fs.lstatSync(absPath);

      if(lstat.isFile() && isModule(p)) {
        var name = getModuleName(p);
        self.updateNameCache(name, absPath);
      } else if(! isIgnoreFolder(p) && lstat.isDirectory()) {
        mapAllNames(absPath);
      }
    });

    function isIgnoreFolder(folderName) {
      return !folderName || folderName === 'node_modules' || folderName[0] === '.';
    }

    function isModule(p) {
      return p.match(/\.(js|json)$/);
    }

    function getModuleName(p) {
      return p.replace(/\.(js|json)$/, '');
    }
  }
832273
def save(self, path):
        
        with open(path, 'w') as out_file:
            json.dump(self.to_dict(), out_file, indent=4)
434296
public void setPath(String path) {

        if (CmsStringUtil.isEmpty(path) || !path.trim().equals(path)) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_FILE_NAME_1, path));
        }
        m_path = path;
    }
996360
protected void addFilePathMapping(BundlePathMapping bundlePathMapping, String pathMapping) {
		long timestamp = 0;
		String filePath = resourceReaderHandler.getFilePath(pathMapping);
		if (filePath != null) {
			timestamp = resourceReaderHandler.getLastModified(filePath);
			List<FilePathMapping> filePathMappings = bundlePathMapping.getFilePathMappings();
			boolean found = false;
			for (FilePathMapping filePathMapping : filePathMappings) {
				if (filePathMapping.getPath().equals(filePath)) {
					found = true;
					break;
				}
			}
			if (!found) {
				filePathMappings.add(new FilePathMapping(bundle, filePath, timestamp));
			}
		}

	}
864834
@Override
    public void setPath ( String path ) {
        if ( path.length() > 0 && path.charAt(0) == '\\' ) {
            path = path.substring(1);
        }
        // win8.1 returns ACCESS_DENIED if the trailing backslash is included
        if ( path.length() > 1 && path.charAt(path.length() - 1) == '\\' ) {
            path = path.substring(0, path.length() - 1);
        }
        this.name = path;
    }
1282958
public static void saveContentMap(Map<String, String> map, File file) throws IOException {

    FileWriter out = new FileWriter(file);
    for (String key : map.keySet()) {
      if (map.get(key) != null) {
        out.write(key.replace(":", "#escapedtwodots#") + ":"
            + map.get(key).replace(":", "#escapedtwodots#") + "\r\n");
      }
    }
    out.close();
  }
1232819
public static String getFilename(String path) throws IllegalArgumentException {
        if (Pattern.matches(sPatternUrl, path))
            return getURLFilename(path);

        return new File(path).getName();
    }
38822
public static synchronized void setBlastPath(String path) {
        // Adding "/" at the end of the sequence
        if (!path.endsWith(File.separator))
            path += File.separatorChar;

        // Setting path
        Blast.path = path;

        // Resetting all cached command paths
        commandPaths.clear();
    }
1176243
def save(self, path):
        """"""
        to_save = {}
        for x in self.param_names:
            attr = self.__getattribute__(x)
            if type(attr) == np.ndarray:
                attr = [[float(x) for x in row] for row in attr]
            elif isinstance(attr, types.FunctionType):
                attr = attr.__name__
            to_save[x] = attr

        json.dump(to_save, open(path, 'w'))
770647
@SuppressWarnings("ResultOfMethodCallIgnored") void updateDestinationFilePath(String filename) {
    String separator = destinationDirectory.endsWith("/") ? "" : File.separator;
    destinationFilePath = destinationDirectory + separator + filename;
    Log.d("TAG", "destinationFilePath: " + destinationFilePath);
    /* if the destination path is directory */
    File file = new File(destinationFilePath);
    if (!file.getParentFile().exists()) {
      /* make dirs in case */
      file.getParentFile().mkdirs();
    }
  }
918044
def save(self, path):
        
        (folder, filename) = os.path.split(path)
        if not filename:
            filename = _clean_filename(self.name)
            path = os.path.join(folder, filename)
        return self.waveform.save(path)
552041
private void writeBinaryFile(String path, InputStream is) throws IOException {
    zip.putNextEntry(new ZipEntry(path));
    try {
      IOUtils.copy(is, zip);
    }
    finally {
      zip.closeEntry();
    }
  }
844474
def abspath(*path):
    """"""
    setup_dir = os.path.dirname(os.path.abspath(__file__))
    return os.path.join(setup_dir, *path)
1306631
public boolean saveKeyTo(String path)
    {
        LinkedList<String> keyList = new LinkedList<String>();
        for (Map.Entry<String, TermFrequency> entry : trie.entrySet())
        {
            keyList.add(entry.getKey());
        }
        return IOUtil.saveCollectionToTxt(keyList, path);
    }
86992
def store_mapping(self, path):
        """"""
        with open(path, "w") as writer:
            for key, value in self.mapping.iteritems():
                writer.write("{}\t{}\n".format(key, value))
98910
protected void addLinkedResource(String path) {
		FilePathMapping linkedResource = getFilePathMapping(path);
		if (linkedResource != null) {
			addLinkedResource(linkedResource);
			if (bundle != null) {
				bundle.getLinkedFilePathMappings()
						.add(new FilePathMapping(bundle, linkedResource.getPath(), linkedResource.getLastModified()));
			}
		}
	}
822529
def save_map(self, map_path, map_data):
    """"""
    return self._client.send(save_map=sc_pb.RequestSaveMap(
        map_path=map_path, map_data=map_data))