/** fireFileChange defines if should be fired fileChanged event after close of stream*/ synchronized OutputStream getOutputStream(FileLock lock, boolean fireFileChanged) throws IOException { FileSystem fs = getAbstractFileSystem(); if (fs.isReadOnly()) { throw new FSException(NbBundle.getMessage(AbstractFileObject.class, "EXC_FSisRO", fs.getDisplayName())); } if (isReadOnly()) { throw new FSException(NbBundle.getMessage(AbstractFileObject.class, "EXC_FisRO", name, fs.getDisplayName())); } testLock(lock); return StreamPool.createOutputStream(this, fireFileChanged); }
try { if (fo.isRoot()) { displayName = fo.getFileSystem().getDisplayName(); } else { displayName = NbBundle.getMessage( FileUtil.class, "LBL_file_in_filesystem", fo.getPath(), fo.getFileSystem().getDisplayName() );
final public void delete(FileLock lock) throws IOException { if (isFolder()) { FileObject[] fos = this.getChildren(); for (int i = 0; i < fos.length; i++) { FileObject fo = fos[i]; FileLock foLock = fo.lock(); try { fo.delete(foLock); } catch (IOException iex) { String message = NbBundle.getMessage(AbstractFolder.class, "EXC_CannotDelete", // XXX use FileUtil.getFileDisplayName instead? getPath(), fo.getFileSystem().getDisplayName() ); ExternalUtil.annotate(iex, message); //NOI18N throw iex; } finally { foLock.releaseLock(); } } } handleDelete(lock); }
@Override public String toString() { return "APTIncludeResolverImpl{\n" + "baseFileIncludeDirIndex=" + baseFileIncludeDirIndex + ",\nbaseFile=" + baseFile + ",\nfileSystem=" + fileSystem.getDisplayName() + // NOI18N ",\nsystemIncludePaths=" + systemIncludePaths + ",\nuserIncludePaths=" + userIncludePaths + ",\nfileSearch=" + fileSearch + "\n}"; // NOI18N }
@Override public String getDisplayName() { return this.explicit!=null?this.explicit.getDisplayName():null; }
@Override public String toString() { Boolean val = exists; return (val == null ? "Not Initialized exist flag" : (val.booleanValue() ? "" : "NOT EXISTING ")) + fileSystem.getDisplayName() + ':' + asCharSeq; // NOI18N }
@Override public String toString() { return getClass().getSimpleName() + ' ' + fileSystem.getDisplayName() + ' ' + absPath; //NOI18N } }
@Override public String getDisplayName() { if (CndFileUtils.isLocalFileSystem(fileSystem)) { return name.toString(); } else { return NbBundle.getMessage(getClass(), "ProjectDisplayName", name, fileSystem.getDisplayName()); } }
@Override public String getHtmlDisplayName() { if (CndFileUtils.isLocalFileSystem(fileSystem)) { return name.toString(); } else { return NbBundle.getMessage(getClass(), "ProjectHtmlDisplayName", name, fileSystem.getDisplayName()); } }
@Override public String toString() { return normalizedAbsPath + ' ' + project.getFileSystem().getDisplayName(); //NOI18N } }
@Override public String toString() { return CndFileUtils.isLocalFileSystem(fileSystem) ? name.toString() : (fileSystem.getDisplayName() + ":" + name); // NOI18N } }
public static CharSequence getUniqueName(FileSystem fs, Object platformProject) { Parameters.notNull("FileSystem", fs); //NOI18N String postfix = CndFileUtils.isLocalFileSystem(fs) ? "" : fs.getDisplayName(); String result; if (platformProject instanceof NativeProject) { result = ((NativeProject) platformProject).getProjectRoot() + "/N/" + postfix; // NOI18N } else if (platformProject instanceof CharSequence) { result = ((CharSequence)platformProject).toString() + "/L/" + postfix; // NOI18N } else if (platformProject == null) { throw new IllegalArgumentException("Incorrect platform project: null"); // NOI18N } else { throw new IllegalArgumentException("Incorrect platform project class: " + platformProject.getClass()); // NOI18N } return ProjectNameCache.getManager().getString(result); }
/** fireFileChange defines if should be fired fileChanged event after close of stream*/ synchronized OutputStream getOutputStream (FileLock lock, boolean fireFileChanged) throws java.io.IOException { FileSystem fs = getAbstractFileSystem (); if (fs.isReadOnly()) FSException.io("EXC_FSisRO", fs.getDisplayName ()); // NOI18N if (isReadOnly()) FSException.io("EXC_FisRO", name, fs.getDisplayName ()); // NOI18N testLock (lock); return StreamPool.createOutputStream(this, fireFileChanged); }
/** fireFileChange defines if should be fired fileChanged event after close of stream*/ synchronized OutputStream getOutputStream (FileLock lock, boolean fireFileChanged) throws java.io.IOException { FileSystem fs = getAbstractFileSystem (); if (fs.isReadOnly()) FSException.io("EXC_FSisRO", fs.getDisplayName ()); // NOI18N if (isReadOnly()) FSException.io("EXC_FisRO", name, fs.getDisplayName ()); // NOI18N testLock (lock); return StreamPool.createOutputStream(this, fireFileChanged); }
public void report() { int readCount = 0; for (StatEntry cnt : stacks.values()) { readCount += cnt.getCount(); } { out.printf("\n\n\n"); // NOI18N printf("\nFile Read Statistics by Path [%s]\n", fileSystem.getDisplayName()); // NOI18N printf("Files count: %d reads count: %d\n", files.size(), readCount); // NOI18N printf("\t Cnt File\n"); // NOI18N for (Map.Entry<String, StatEntry> mapEntry : sortByCount(files)) { StatEntry statEntry = mapEntry.getValue(); printf("\t%6d %s\n", statEntry.getCount(), mapEntry.getKey()); // NOI18N } out.flush(); } { printf("\n\nFile Read Statistics by Stack [%s]\n", fileSystem.getDisplayName()); // NOI18N printf("Stacks count: %d reads count: %d\n", stacks.size(), readCount); // NOI18N for (Map.Entry<String, StatEntry> mapEntry : sortByCount(stacks)) { StatEntry statEntry = mapEntry.getValue(); assert statEntry.getStack().equals(mapEntry.getKey()); report(statEntry); } out.flush(); } }
try { if (fo.isRoot()) { displayName = fo.getFileSystem().getDisplayName(); } else { displayName = NbBundle.getMessage(FileUtil.class, "LBL_file_in_filesystem", fo.getPath(), fo.getFileSystem().getDisplayName());
try { if (fo.isRoot()) { displayName = fo.getFileSystem().getDisplayName(); } else { displayName = NbBundle.getMessage(FileUtil.class, "LBL_file_in_filesystem", fo.getPath(), fo.getFileSystem().getDisplayName());
final public void delete(FileLock lock) throws IOException { if (isFolder ()) { FileObject[] fos = this.getChildren(); for (int i = 0; i < fos.length; i++) { FileObject fo = fos[i]; FileLock foLock = fo.lock(); try { fo.delete(foLock); } catch (IOException iex) { String message = NbBundle.getMessage(getClass(), "EXC_CannotDelete", //NOI18N // XXX use FileUtil.getFileDisplayName instead? getPath(), fo.getFileSystem().getDisplayName()); ExternalUtil.annotate(iex, message);//NOI18N throw iex; } finally { foLock.releaseLock(); } } } handleDelete (lock); }
final public void delete(FileLock lock) throws IOException { if (isFolder ()) { FileObject[] fos = this.getChildren(); for (int i = 0; i < fos.length; i++) { FileObject fo = fos[i]; FileLock foLock = fo.lock(); try { fo.delete(foLock); } catch (IOException iex) { String message = NbBundle.getMessage(getClass(), "EXC_CannotDelete", //NOI18N // XXX use FileUtil.getFileDisplayName instead? getPath(), fo.getFileSystem().getDisplayName()); ExternalUtil.annotate(iex, message);//NOI18N throw iex; } finally { foLock.releaseLock(); } } } handleDelete (lock); }
/** Creates arguments for given shadow node */ private Object[] createArguments () { String origDisp; String shadowName = obj.getName (); if (obj.original.isValid()) { origDisp = obj.original.getNodeDelegate().getDisplayName(); } else { // We will soon be a broken data shadow, in the meantime... origDisp = ""; // NOI18N } Boolean useOwnName = (Boolean)obj.getPrimaryFile ().getAttribute (ATTR_USEOWNNAME); if (obj.original.getPrimaryFile ().isRoot () && (useOwnName == null || !useOwnName.booleanValue ())) { try { shadowName = obj.original.getPrimaryFile ().getFileSystem ().getDisplayName (); } catch (FileStateInvalidException e) { // ignore } } return new Object[] { shadowName, // name of the shadow super.getDisplayName (), // name of original systemNameOrFileName (obj.getPrimaryFile ()), // full name of file for shadow systemNameOrFileName (obj.getOriginal ().getPrimaryFile ()), // full name of original file origDisp, // display name of original }; }