Checks the expected paths are writable.
431798
private function checkPermissions()
    {
        foreach ($this->writableDirectories as $path) {
            if (!$this->filesystem->isWritable(base_path($path))) {
                $this->console->error($path . ' is not writable');
                $this->errors = true;
            }
        }
    }
251780
function check( input, expected ) {
            const output = Util.replaceDotsWithSlashes( input );
            expect( output ).toBe( expected.split( '/' ).join( Path.sep ) );
        }
243850
def is_path_creatable(pathname: str) -> bool:
    
    # Parent directory of the passed path. If empty, we substitute the current
    # working directory (CWD) instead.
    dirname = os.path.dirname(pathname) or os.getcwd()
    return os.access(dirname, os.W_OK)
625816
public function isWritable() {

		if(false !== $this -> directory -> getExists()) {

			$this -> refresh();
			
			return $this -> directory -> getWritable();
		}

		return false;
	}
311004
def check_path(path, otherwise):
    

    if os.path.exists(path):
        print("WARNING: Path '%s' already exists; skipping" % path)
    else:
        otherwise(path)
991888
def is_readable(path):
    '''
    
    '''

    if os.access(path, os.F_OK) and os.access(path, os.R_OK):
        # The path exists and is readable
        return True

    # The path does not exist
    return False
343345
def prepare_writeable_dir(tree):
    '''  '''

    if tree != '/':
        tree = os.path.realpath(os.path.expanduser(tree))
    if not os.path.exists(tree):
        try:
            os.makedirs(tree)
        except (IOError, OSError), e:
            exit("Could not make dir %s: %s" % (tree, e))
    if not os.access(tree, os.W_OK):
        exit("Cannot write to path %s" % tree)
119124
def check_output_directory(self, path):
        
        if not os.path.isdir(path):
            self.print_error(u"Directory '%s' does not exist" % (path))
            return False
        test_file = os.path.join(path, u"file.test")
        if not gf.file_can_be_written(test_file):
            self.print_error(u"Unable to write inside directory '%s'" % (path))
            self.print_error(u"Make sure the directory path is written/escaped correctly and that you have write permission on it")
            return False
        return True
535530
def _is_path(s):
    """"""
    if isinstance(s, string_types):
        try:
            return op.exists(s)
        except (OSError, ValueError):
            return False
    else:
        return False
878661
private static void checkSrcPath(Configuration conf, List<Path> srcPaths
      ) throws IOException {
    List<IOException> rslt = new ArrayList<IOException>();
    List<Path> unglobbed = new LinkedList<Path>();
    for (Path p : srcPaths) {
      FileSystem fs = p.getFileSystem(conf);
      FileStatus[] inputs = fs.globStatus(p);

      if(inputs != null && inputs.length > 0) {
        for (FileStatus onePath: inputs) {
          unglobbed.add(onePath.getPath());
        }
      } else {
        rslt.add(new IOException("Input source " + p + " does not exist."));
      }
    }
    if (!rslt.isEmpty()) {
      throw new InvalidInputException(rslt);
    }
    srcPaths.clear();
    srcPaths.addAll(unglobbed);
  }
179859
function writable(file) {
  if (!exists(file)) {
    return writable(path.dirname(file));
  } else {
    try {
      fs.accessSync(file, fs.W_OK);
    } catch (e) {
      return false;
    }
    return true;
  }
}
373407
public static function writable($path)
    {
        $path = Normalize::diskFullPath($path);

        if (!self::exist($path)) {
            return false;
        }

        return (is_dir($path) && is_writable($path));
    }
1022550
protected function ensureFileIsWritable()
    {
        if ((!is_writable($this->filePath) || !is_file($this->filePath))
            && (!is_dir(dirname($this->filePath)) || !is_writable(dirname($this->filePath)))
        ) {
            throw new InvalidPathException(sprintf('Unable to write the environment file at %s.', $this->filePath));
        }
    }
1177085
function isValidPath(path, allowDots)
	{
		if (typeof path !== 'string')
			return false;
		if (!path)
			return false;
		if (!/^([a-z]:[\/\\])?[a-z0-9_~\/\.\-]+$/i.test(path))
			return false;
		if (!allowDots && /^\.{1,2}$/.test(path))
			return false;

		return true;
	}
374469
public function isWritable($path)
	{
		$path = Util::normalizePath($path);

		return (bool) $this->adapter->isWritable($path);
	}
629688
private boolean matchPath(String expected, String actual) {

        return CmsStringUtil.joinPaths(actual, "/").equals(CmsStringUtil.joinPaths(expected, "/"));
    }
116710
protected function ensure_path_exists() {
        global $CFG;
        if (!is_writable($this->path)) {
            if ($this->custompath && !$this->autocreate) {
                throw new coding_exception('File store path does not exist. It must exist and be writable by the web server.');
            }
            $createdcfg = false;
            if (!isset($CFG)) {
                // This can only happen during destruction of objects.
                // A cache is being used within a destructor, php is ending a request and $CFG has
                // already being cleaned up.
                // Rebuild $CFG with directory permissions just to complete this write.
                $CFG = $this->cfg;
                $createdcfg = true;
            }
            if (!make_writable_directory($this->path, false)) {
                throw new coding_exception('File store path does not exist and can not be created.');
            }
            if ($createdcfg) {
                // We re-created it so we'll clean it up.
                unset($CFG);
            }
        }
        return true;
    }