Make sure the parent directory exists, then touch the file
325520
def make_file_exist(self):
        """"""
        self.parent.make_directory_exist()
        self.parent.touch_file(self.name)
        return self
922267
def contains_parent_dir(fpath, dirs):
    
    # Note: this function is used nowhere in pygccxml but is used
    # at least by pypluplus; so it should stay here.

    return bool([x for x in dirs if _f(fpath, x)])
918014
def has_parent_object(self, dir_object):
        """"""
        obj = self
        while obj:
            if obj == dir_object:
                return True
            obj = obj.parent_dir
        return False
593687
def dir_exists(location, use_sudo=False):
    """"""
    with settings(hide('running', 'stdout', 'stderr'), warn_only=True):
        if use_sudo:
            # convert return code 0 to True
            return not bool(sudo('test -d %s' % (location)).return_code)
        else:
            return not bool(run('test -d %s' % (location)).return_code)
1090864
function(parent, fileName, callback) {
			fs.stat(parent, function(err, stat) {
				if (err) {
					return callback(err);
				}

				if (stat.isFile()) {
					parent = path.dirname(parent);
				}

				var filepath = path.resolve(parent, fileName);
				callback(null, filepath);
			});
		}
1189710
def parent_directory(self):
        """"""
        self.chdir(os.path.join(getcwd_or_home(), os.path.pardir))
635712
def _ensure_filepath(filename):
        

        filepath = os.path.dirname(filename)
        if not os.path.exists(filepath):
            os.makedirs(filepath)
1109939
def ensure_dir(filename):
    """"""
    directory = os.path.dirname(filename)
    if directory and not os.path.isdir(directory):
        os.makedirs(directory)
1371993
def _check_module(folder):
        
        if not folder.exists():
            folder.mkdir(parents=True, exist_ok=True, mode=0o755)
            (folder / '__init__.py').touch()
573988
def ensure_dir_exists(verify_dir):
    """"""
    if not os.path.exists(verify_dir):
        # Doesn't exist create dir
        os.makedirs(verify_dir)
    else:
        # Exists
        if not os.path.isdir(verify_dir):
            # Not a dir, raise an exception
            raise ValueError("{} is not a directory".format(verify_dir))
641527
def mkdir_parents(path):
    

    try:
        os.makedirs(path)
    except OSError as exc:
        if exc.errno == errno.EEXIST:
            pass
        else:
            raise
801730
def ensure_dir_exists(directory):
    """"""
    if directory and not os.path.exists(directory):
        os.makedirs(directory)
519965
def go_to_parent_directory(self):
        """"""
        self.chdir(osp.abspath(osp.join(getcwd_or_home(), os.pardir)))
2705
function existDir(getDir) {
        fs.exists(getDir, (exists) => {
            if (exists) {
                existDir(`${dir}/${getVersion()}`);
            } else {
                callBack(_baseVersion.join('.'));
            }
        });
    }
389428
def check_existance(f):
    """"""
    if not opath.isfile(f):
        logging.error("Nanoget: File provided doesn't exist or the path is incorrect: {}".format(f))
        sys.exit("File provided doesn't exist or the path is incorrect: {}".format(f))
961902
def ensure_exists(self):
        """"""
        if not self.context.is_directory(self.directory):
            # This can also happen when we don't have permission to one of the
            # parent directories so we'll point that out in the error message
            # when it seems applicable (so as not to confuse users).
            if self.context.have_superuser_privileges:
                msg = "The directory %s doesn't exist!"
                raise ValueError(msg % self)
            else:
                raise ValueError(compact("""
                    The directory {location} isn't accessible, most likely
                    because it doesn't exist or because of permissions. If
                    you're sure the directory exists you can use the
                    --use-sudo option.
                """, location=self))
458657
function (ds, acc, m, cb) {
    if (ds.length > 0) {
      var d = ds.shift();

      acc.push(d);
      var dir = acc.join(path.sep);

      // look for dir on the fs, if it doesn't exist then create it, and 
      // continue our walk, otherwise if it's a file, we have a name
      // collision, so exit.
      fs.stat(dir, function (err, stat) {
        // if the directory doesn't exist then create it
        if (err) {
          // 2 means it's wasn't there
          if (err.errno == 2 || err.errno == 34) {
            fs.mkdir(dir, m, function (erro) {
              if (erro && erro.errno != 17 && erro.errno != 34) {
                return cb(erro);
              } else {
                return walk(ds, acc, m, cb);
              }
            });
          } else {
            return cb(err);
          }
        } else {
          if (stat.isDirectory()) {
            return walk(ds, acc, m, cb);
          } else {
            return cb(new Error("Failed to mkdir " + dir + ": File exists\n"));
          }
        }
      });
    } else {
      return cb();
    }
  }