Sets the acl on path

@param path
@param acl
List of ACL permissions to assign to the path.
@throws ZkException
if any ZooKeeper exception occurred
@throws RuntimeException
if any other exception occurs
354287
public void setAcl(final String path, final List<ACL> acl) throws ZkException {
        if (path == null) {
            throw new NullPointerException("Missing value for path");
        }

        if (acl == null || acl.size() == 0) {
            throw new NullPointerException("Missing value for ACL");
        }

        if (!exists(path)) {
            throw new RuntimeException("trying to set acls on non existing node " + path);
        }

        retryUntilConnected(new Callable<Void>() {
            @Override
            public Void call() throws Exception {
                Stat stat = new Stat();
                _connection.readData(path, stat, false);
                _connection.setAcl(path, acl, stat.getAversion());
                return null;
            }
        });
    }
1306573
public void deleteNode(String path, long zxid)
            throws KeeperException.NoNodeException {
        int lastSlash = path.lastIndexOf('/');
        String parentName = path.substring(0, lastSlash);
        String childName = path.substring(lastSlash + 1);
        DataNode node = nodes.get(path);
        if (node == null) {
            throw new KeeperException.NoNodeException();
        }
        nodes.remove(path);
        DataNode parent = nodes.get(parentName);
        if (parent == null) {
            throw new KeeperException.NoNodeException();
        }
        synchronized (parent) {
            parent.removeChild(childName);
            parent.stat.setCversion(parent.stat.getCversion() + 1);
            parent.stat.setPzxid(zxid);
            long eowner = node.stat.getEphemeralOwner();
            if (eowner != 0) {
                HashSet<String> nodes = ephemerals.get(eowner);
                if (nodes != null) {
                    synchronized (nodes) {
                        nodes.remove(path);
                    }
                }
            }
            node.parent = null;
        }
        if (parentName.startsWith(procZookeeper)) {
            // delete the node in the trie.
            if (Quotas.limitNode.equals(childName)) {
                // we need to update the trie
                // as well
                pTrie.deletePath(parentName.substring(quotaZookeeper.length()));
            }
        }

        // also check to update the quotas for this node
        String lastPrefix = pTrie.findMaxPrefix(path);
        if (!rootZookeeper.equals(lastPrefix) && !("".equals(lastPrefix))) {
            // ok we have some match and need to update
            updateCount(lastPrefix, -1);
            int bytes = 0;
            synchronized (node) {
                bytes = (node.data == null ? 0 : -(node.data.length));
            }
            updateBytes(lastPrefix, bytes);
        }
        if (LOG.isTraceEnabled()) {
            ZooTrace.logTraceMessage(LOG, ZooTrace.EVENT_DELIVERY_TRACE_MASK,
                    "dataWatches.triggerWatch " + path);
            ZooTrace.logTraceMessage(LOG, ZooTrace.EVENT_DELIVERY_TRACE_MASK,
                    "childWatches.triggerWatch " + parentName);
        }
        Set<Watcher> processed = dataWatches.triggerWatch(path,
                EventType.NodeDeleted);
        childWatches.triggerWatch(path, EventType.NodeDeleted, processed);
        childWatches.triggerWatch(parentName.equals("") ? "/" : parentName,
                EventType.NodeChildrenChanged);
    }
77767
public function set(string $path, $value): void
    {
        if (!empty($path)) {
            $at = & $this->items;
            $keys = $this->explode($path);

            while (count($keys) > 0) {
                if (count($keys) === 1) {
                    if (!is_array($at)) {
                        throw new RuntimeException('Can not set value at this path ['.$path.'] because is not array.');
                    }
                    $at[array_shift($keys)] = $value;
                } else {
                    $key = array_shift($keys);
                    if (!isset($at[$key])) {
                        $at[$key] = [];
                    }
                    $at =& $at[$key];
                }
            }
        } else {
            $this->items = [$value];
        }
    }
301673
@ConfigArg(0)
  public void setPath(PathImpl path)
  {
    _classDir = path;

    if (_sourceDir == null) {
      _sourceDir = path;
    }
  }
839070
def set_acl(self, acl_or_str, key_name='', validate=True, headers=None,
                version_id=None):
        """"""
        if not self.bucket_name:
            raise InvalidUriError('set_acl on bucket-less URI (%s)' %
                                  self.uri)
        self.get_bucket(validate, headers).set_acl(acl_or_str, key_name,
                                                   headers, version_id)
1153819
protected void ensureExists(final String path, final byte[] data, final List<ACL> acl, final CreateMode flags) {
        try {
            retryOperation(new ZooKeeperOperation() {
                public boolean execute() throws KeeperException, InterruptedException {
                    Stat stat = zookeeper.exists(path, false);
                    if (stat != null) {
                        return true;
                    }
                    zookeeper.create(path, data, acl, flags);
                    return true;
                }
            });
        } catch (KeeperException e) {
            LOG.warn("Caught: " + e, e);
        } catch (InterruptedException e) {
            LOG.warn("Caught: " + e, e);
        }
    }
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();
    }
25212
public static String applySpecialPaths(String path) throws IllegalArgumentException {
        List<String> tokens = getTokens(path);
        if (tokens == null) { return null; }
        int i = 0;
        for (int j = 0; j < tokens.size(); j++) {
            String token = tokens.get(j);
            if (isCurrentToken(token)) { continue; } else if (isReverseToken(token)) { i--; } else { tokens.set(i++, token); }
            if (i < 0) {
                throw VFSMessages.MESSAGES.onRootPath();
            }
        }
        return getRemainingPath(tokens, 0, i);
    }
981234
public static String permissions(Path path) {
        try {
            return permissions(getUnixMode(path));
        } catch (IOException e) {
            throw Exceptions.propagate(e);
        }
    }
42742
public void release(String pathInZooKeeper) throws Exception {
		final String path = normalizePath(pathInZooKeeper);

		try {
			client.delete().forPath(getLockPath(path));
		} catch (KeeperException.NoNodeException ignored) {
			// we have never locked this node
		} catch (Exception e) {
			throw new Exception("Could not release the lock: " + getLockPath(pathInZooKeeper) + '.', e);
		}
	}
93502
public void addPath(String path) {
        if (path == null) {
            return;
        }
        String[] pathComponents = path.split("/");
        TrieNode parent = rootNode;
        String part = null;
        if (pathComponents.length <= 1) {
            throw new IllegalArgumentException("Invalid path " + path);
        }
        for (int i=1; i<pathComponents.length; i++) {
            part = pathComponents[i];
            if (parent.getChild(part) == null) {
                parent.addChild(part, new TrieNode(parent));
            }
            parent = parent.getChild(part);
        }
        parent.setProperty(true);
    }
27728
public void setDocPath(FileObject path) {
        setDocPath = true;
        if (path == null)
            return;
        if (!path.equals(docPath)) {
            docPath = path;
            checkDoc();
        }
    }
880406
public void setFinal(Path path) {

		// Step through the nodes creating any nodes which don't exist.
		Node currentNode = root;
		for (Term t : path.getTerms()) {
			Node nextNode = currentNode.getChild(t);
			if (nextNode == null) {
				nextNode = currentNode.newChild(t);
			}
			currentNode = nextNode;
		}

		// The current node is now the one corresponding to the last term in the
		// path. Set this as final.
		currentNode.setFinal();
	}
911370
public function setConnectionRoot($path = '')
    {
        $basePath = $path ?: $this->config['root'];

        if ($basePath && (!ftp_chdir($this->connection, $basePath))) {
            throw new RuntimeException('Root is invalid or does not exist: ' . $basePath);
        }

        // Store absolute path for further reference.
        $this->base_directory = ftp_pwd($this->connection);
    }
719703
private void safeSetPathPermission(Path path, OwnerAndPermission ownerAndPermission) {

    try {
      if (ownerAndPermission.getFsPermission() != null) {
        this.fs.setPermission(path, ownerAndPermission.getFsPermission());
      }
    } catch (IOException ioe) {
      log.warn("Failed to set permission for directory " + path, ioe);
    }

    String owner = Strings.isNullOrEmpty(ownerAndPermission.getOwner()) ? null : ownerAndPermission.getOwner();
    String group = Strings.isNullOrEmpty(ownerAndPermission.getGroup()) ? null : ownerAndPermission.getGroup();

    try {
      if (owner != null || group != null) {
        this.fs.setOwner(path, owner, group);
      }
    } catch (IOException ioe) {
      log.warn("Failed to set owner and/or group for path " + path, ioe);
    }
  }
1031467
def set_acl(self, role, users):
        
        acl_updates = [{"user": user, "role": role} for user in users]
        r = fapi.update_repository_method_acl(
            self.namespace, self.name, self.snapshot_id,
            acl_updates, self.api_url
        )
        fapi._check_response_code(r, 200)
280373
public void setPath(String path) {
        if (path != null) {
            manifest = ManifestIterator.getInstance().findByPath(path);
        }
    }