Saves the line folds for the specified path
@param {!string} path the path to the document
@param {Object} folds the fold ranges to save for the current document
182563
function setFolds(path, folds) {
        var context = getViewStateContext();
        var allFolds = PreferencesManager.getViewState(FOLDS_PREF_KEY, context);
        allFolds[path] = simplify(folds);
        PreferencesManager.setViewState(FOLDS_PREF_KEY, allFolds, context);
    }
64862
function resolvePath (path) {
  if (path) {
    // <rootDir>
    if (path.indexOf('<rootDir>') === 0) {
      return `"${path.replace('<rootDir>', root).replace(/\\/g, '\\\\')}"`
    } else {
      return `"${resolve(path).replace(/\\/g, '\\\\')}"`
    }
  } else {
    return ''
  }
}
118528
function SvgPath(path) {
  if (!(this instanceof SvgPath)) { return new SvgPath(path); }

  // Array of path segments.
  // Each segment is array [command, param1, param2, ...]
  try {
    this.segments = parse(path);
  } catch (e) {
    this.segments = [];
  }
}
317750
public void saveAsFile(List<String> labels, String path) throws IOException {
        BufferedWriter write = null;
        try {
            write = new BufferedWriter(new FileWriter(new File(path)));
            for (int i = 0; i < Y.rows(); i++) {
                if (i >= labels.size())
                    break;
                String word = labels.get(i);
                if (word == null)
                    continue;
                StringBuilder sb = new StringBuilder();
                INDArray wordVector = Y.getRow(i);
                for (int j = 0; j < wordVector.length(); j++) {
                    sb.append(wordVector.getDouble(j));
                    if (j < wordVector.length() - 1)
                        sb.append(",");
                }

                sb.append(",");
                sb.append(word);
                sb.append("\n");
                write.write(sb.toString());

            }
            write.flush();
            write.close();
        } finally {
            if (write != null)
                write.close();
        }
    }
869185
function normalizePath(path)
{
    if (path.indexOf("..") === -1 && path.indexOf('.') === -1)
        return path;

    var normalizedSegments = [];
    var segments = path.split("/");
    for (var i = 0; i < segments.length; i++) {
        var segment = segments[i];
        if (segment === ".")
            continue;
        else if (segment === "..")
            normalizedSegments.pop();
        else if (segment)
            normalizedSegments.push(segment);
    }
    var normalizedPath = normalizedSegments.join("/");
    if (normalizedPath[normalizedPath.length - 1] === "/")
        return normalizedPath;
    if (path[0] === "/" && normalizedPath)
        normalizedPath = "/" + normalizedPath;
    if ((path[path.length - 1] === "/") || (segments[segments.length - 1] === ".") || (segments[segments.length - 1] === ".."))
        normalizedPath = normalizedPath + "/";

    return normalizedPath;
}
634804
public void changePathInURL(String path, boolean changeHistory) {
        jcrURL.setPath(path);
        if (changeHistory) {
            htmlHistory.newItem(jcrURL.toString(), false);
        }
    }
32008
function CrosswalkDir(path) {

    this._path = path;
    this._root = "./";

    var versionFilePath = Path.join(path, "VERSION");
    if (ShellJS.test("-f", versionFilePath)) {
        this._version = Version.createFromFile(versionFilePath);
    } else {
        this._version = Version.createFromPath(path);
    }

    if (!this._version) {
        throw new Error("Failed to determine crosswalk version");
    }
}
673565
public void write(String path){

		File f = new File(path);		
		if(!f.exists()){
			f.mkdirs();
		}

		Iterator<FNLPDoc> it = docs.iterator();
		while(it.hasNext()){
			FNLPDoc doc = it.next();
			doc.write(path);
		}

	}
1207750
function( path, pathString ) {
            if (path.hidden && pathString.charAt(0) !== "_") { // path will be shown, so show it
                path.show();
                path.hidden = false;
            }

            // See: http://dmitrybaranovskiy.github.io/raphael/reference.html#Element.animate
            path.animate(
                {
                    path: pathString.charAt(0) === "_"?
                        pathString.substring(1):
                        pathString // remove the "_" prefix if it exists
                },
                this.CONFIG.animation.connectorsSpeed,
                this.CONFIG.animation.connectorsAnimation,
                function() {
                    if ( pathString.charAt(0) === "_" ) { // animation is hiding the path, hide it at the and of animation
                        path.hide();
                        path.hidden = true;
                    }
                }
            );
            return this;
        }
1315577
public void exportIMG(String path, String type) throws IOException {

        switch (type) {
            case "JPG":
                try {
                    ChartUtilities.saveChartAsJPEG(new File(path + File.separator + name + ".jpg"), chart, width, height);
                } catch (IOException e) {

                }
                break;
            case "PNG":
                try {
                    ChartUtilities.saveChartAsPNG(new File(path + File.separator + name + ".png"), chart, width, height);
                } catch (IOException e) {

                }
                break;
            case "SVG":
                String svg = generateSVG(width, height);
                BufferedWriter writer = null;
                try {
                    writer = new BufferedWriter(new FileWriter(new File(path + File.separator + name + ".svg")));
                    writer.write("<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n");
                    writer.write(svg + "\n");
                    writer.flush();
                } finally {
                    try {
                        if (writer != null) {
                            writer.close();
                        }
                    } catch (IOException ex) {
                        throw new RuntimeException(ex);
                    }
                }
                break;

        }

    }
267810
function updateFold(fold, offset){
			var next = fold;
			var parentFold = THIS.parentFold;
			
			while(next = next.nextFold)
				next.y  += offset;
			parentFold || edgeCheck(offset);
			fold.height += offset;
			THIS.height += offset;
			
			parentFold && parentFold.open && THIS.parent.updateFold(parentFold, offset);
		}
993943
function parsePath(path) {
    if (!path) return
    if (path.indexOf(',') == -1) {
        return {
            path : path.replace(/\s/g, '')
        }
    } else {
        let segments = path.split(","),
            vars = segments.slice(1)
        return {
            path: segments[0].replace(/\s/g, ''),
            vars: vars.map(o=>o.replace(/\s/g, ''))
        }
    }
}
437084
function addCSS(path) {
        if ('createStyleSheet' in document) {
            // IE9
            document.createStyleSheet(path);
        }
        else {
            // Everyone else
            var link = $("<link>");
            $("head").append(link);
            link.attr({
                rel: 'stylesheet',
                type: 'text/css',
                href: path
            });
        }
    }
221807
def save(path, params = {})
            options =
            {
                delinearize: true,
                recompile: true,
                decrypt: false
            }
            options.update(params)

            if self.frozen? # incompatible flags with frozen doc (signed)
                options[:recompile] =
                options[:rebuild_xrefs] =
                options[:noindent] =
                options[:obfuscate] = false
            end

            if path.respond_to?(:write)
                fd = path
            else
                path = File.expand_path(path)
                fd = File.open(path, 'w').binmode
                close = true
            end

            load_all_objects unless loaded?

            intents_as_pdfa1 if options[:intent] =~ /pdf[\/-]?A1?/i
            self.delinearize! if options[:delinearize] and self.linearized?
            compile(options) if options[:recompile]

            fd.write output(options)
            fd.close if close

            self
        end
433134
function put(path, val) {
  var pos = splitPath(path).reduce(function (t, segment) {
    if (!t[segment]) { t[segment] = {} }
    return t[segment]
  }, this)
  pos['@'] = val;
  return this;
}
551407
function( path, callback ) {
		var parts = ( path || '' ).split( /\//g ),
			filepath = '/';

		// Trim Left
		if ( ! parts[ 0 ].length ) {
			parts.shift();
		}

		// Trim right
		if ( parts.length && ! parts[ parts.length - 1 ].length ) {
			parts.pop();
		}

		// Handle root '/' error
		if ( ! parts.length ) {
			return callback( new Error( "No directory path found to make" ) );
		}

		// Make sure each branch is created
		async.mapSeries( parts,
			function( dir, callback ) {
				fs.stat( filepath += dir + '/', function( e, stat ) {
					if ( stat && stat.isDirectory() ) {
						callback();
					}
					else {
						fs.mkdir( filepath, callback );
					}
				});
			},
			callback
		);
	}
762563
function SvgPath(path) {
  if (!(this instanceof SvgPath)) { return new SvgPath(path); }

  var pstate = pathParse(path);

  // Array of path segments.
  // Each segment is array [command, param1, param2, ...]
  this.segments = pstate.segments;

  // Error message on parse error.
  this.err      = pstate.err;

  // Transforms stack for lazy evaluation
  this.__stack    = [];
}