public Stat forPath(String path) { path = client.fixForNamespace(path); Stat resultStat = null; if (backgrounding.inBackground()) { client.processBackgroundOperation(new OperationAndData <String>(this, path, backgrounding.getCallback(), null, backgrounding.getContext()), null); } else { resultStat = pathInForeground(path); } return(resultStat); }
public Stat forPath(String path, byte[] data) { if (compress) { data = client.getCompressionProvider().compress(path, data); } path = client.fixForNamespace(path); Stat resultStat = null; if (backgrounding.inBackground()) { client.processBackgroundOperation(new OperationAndData <PathAndBytes>(this, new PathAndBytes(path, data), backgrounding.getCallback(), null, backgrounding.getContext()), null); } else { resultStat = pathInForeground(path, data); } return(resultStat); }