if (workerPath.isSubDirectoryOf(path) || F.eq(workerPath, path)) { await = true;
@Override public Boolean onSuccess(Map<IgfsPath, IgfsEntryInfo> infos) throws Exception { fs.mkdirs(path, props); assert !infos.isEmpty(); // Now perform synchronization again starting with the last created parent. IgfsPath parentPath = null; for (IgfsPath curPath : infos.keySet()) { if (parentPath == null || curPath.isSubDirectoryOf(parentPath)) parentPath = curPath; } assert parentPath != null; IgfsEntryInfo parentPathInfo = infos.get(parentPath); synchronize(fs, parentPath, parentPathInfo, path, true, null); if (evts.isRecordable(EventType.EVT_IGFS_DIR_CREATED)) { IgfsPath evtPath = path; while (!parentPath.equals(evtPath)) { pendingEvts.addFirst(new IgfsEvent(evtPath, locNode, EventType.EVT_IGFS_DIR_CREATED)); evtPath = evtPath.parent(); assert evtPath != null; // If this fails, then ROOT does not exist. } } return true; }
/** * Resolves IGFS mode for the given path. * * @param path IGFS path. * @return IGFS mode. */ public IgfsMode resolveMode(IgfsPath path) { assert path != null; if (modes == null) return dfltMode; else { IgfsMode mode = modesCache.get(path); if (mode == null) { for (T2<IgfsPath, IgfsMode> entry : modes) { if (F.eq(path, entry.getKey()) || path.isSubDirectoryOf(entry.getKey())) { // As modes ordered from most specific to least specific first mode found is ours. mode = entry.getValue(); break; } } if (mode == null) mode = dfltMode; modesCache.put(path, mode); } return mode; } }
if (mode.getKey().isSubDirectoryOf(resMode.getKey())) { assert resMode.getValue() != null;
if (dest.isSubDirectoryOf(src)) throw new IgfsInvalidPathException("Failed to rename directory (cannot move directory of " + "upper level to self sub-dir) [src=" + src + ", dest=" + dest + ']');
if (parentPath == null || curPath.isSubDirectoryOf(parentPath)) parentPath = curPath;
if (workerPath.isSubDirectoryOf(path) || F.eq(workerPath, path)) { await = true;
@Override public Boolean onSuccess(Map<IgfsPath, IgfsEntryInfo> infos) throws Exception { fs.mkdirs(path, props); assert !infos.isEmpty(); // Now perform synchronization again starting with the last created parent. IgfsPath parentPath = null; for (IgfsPath curPath : infos.keySet()) { if (parentPath == null || curPath.isSubDirectoryOf(parentPath)) parentPath = curPath; } assert parentPath != null; IgfsEntryInfo parentPathInfo = infos.get(parentPath); synchronize(fs, parentPath, parentPathInfo, path, true, null); if (evts.isRecordable(EventType.EVT_IGFS_DIR_CREATED)) { IgfsPath evtPath = path; while (!parentPath.equals(evtPath)) { pendingEvts.addFirst(new IgfsEvent(evtPath, locNode, EventType.EVT_IGFS_DIR_CREATED)); evtPath = evtPath.parent(); assert evtPath != null; // If this fails, then ROOT does not exist. } } return true; }
/** * Resolves IGFS mode for the given path. * * @param path IGFS path. * @return IGFS mode. */ public IgfsMode resolveMode(IgfsPath path) { assert path != null; if (modes == null) return dfltMode; else { IgfsMode mode = modesCache.get(path); if (mode == null) { for (T2<IgfsPath, IgfsMode> entry : modes) { if (F.eq(path, entry.getKey()) || path.isSubDirectoryOf(entry.getKey())) { // As modes ordered from most specific to least specific first mode found is ours. mode = entry.getValue(); break; } } if (mode == null) mode = dfltMode; modesCache.put(path, mode); } return mode; } }
if (mode.getKey().isSubDirectoryOf(resMode.getKey())) { assert resMode.getValue() != null;
if (parentPath == null || curPath.isSubDirectoryOf(parentPath)) parentPath = curPath;
if (dest.isSubDirectoryOf(src)) throw new IgfsInvalidPathException("Failed to rename directory (cannot move directory of " + "upper level to self sub-dir) [src=" + src + ", dest=" + dest + ']');