Source:
<code>public boolean internalWrite(IProject target, IProjectDescription description, int updateFlags, boolean hasPublicChanges, boolean hasPrivateChanges) throws CoreException { if (hasPrivateChanges) getWorkspace().getMetaArea().writePrivateDescription(target); if (!hasPublicChanges) return false; if (description == null) return false; ByteArrayOutputStream out = new ByteArrayOutputStream(); IFile descriptionFile = target.getFile(IProjectDescription.DESCRIPTION_FILE_NAME); try { new ModelObjectWriter().write(description, out, FileUtil.getLineSeparator(descriptionFile)); } catch (IOException e) { String msg = NLS.bind(Messages.resources_writeMeta, target.getFullPath()); throw new ResourceException(IResourceStatus.FAILED_WRITE_METADATA, target.getFullPath(), msg, e); } byte[] newContents = out.toByteArray(); if (!descriptionFile.exists()) workspace.createResource(descriptionFile, false); else { if (!descriptionChanged(descriptionFile, newContents)) return false; } ByteArrayInputStream in = new ByteArrayInputStream(newContents); IFileStore descriptionFileStore = ((Resource) descriptionFile).getStore(); IFileInfo fileInfo = descriptionFileStore.fetchInfo(); final boolean isWindows = System.getProperty("sun.desktop").equals("windows"); if <START> (isWindows) { <END> ResourceAttributes descriptionFileAttributes = descriptionFile.getResourceAttributes(); descriptionFileAttributes.setHidden(false); descriptionFile.setResourceAttributes(descriptionFileAttributes); } if (fileInfo.getAttribute(EFS.ATTRIBUTE_READ_ONLY)) { IStatus result = getWorkspace().validateEdit(new IFile[] {descriptionFile}, null); if (!result.isOK()) throw new ResourceException(result); fileInfo = descriptionFileStore.fetchInfo(); } write(descriptionFile, in, fileInfo, IResource.FORCE, false, Policy.monitorFor(null)); workspace.getAliasManager().updateAliases(descriptionFile, getStore(descriptionFile), IResource.DEPTH_ZERO, Policy.monitorFor(null)); long lastModified = ((Resource) descriptionFile).getResourceInfo(false, false).getLocalSyncInfo(); ResourceInfo info = ((Resource) target).getResourceInfo(false, true); updateLocalSync(info, lastModified); getWorkspace().getMetaArea().clearOldDescription(target); return true; }</code><technical_language>Please Platform.getOS().equals(Platform.OS_WIN32)</technical_language>

Target:
public boolean internalWrite(IProject target, IProjectDescription description, int updateFlags, boolean hasPublicChanges, boolean hasPrivateChanges) throws CoreException { if (hasPrivateChanges) getWorkspace().getMetaArea().writePrivateDescription(target); if (!hasPublicChanges) return false; if (description == null) return false; ByteArrayOutputStream out = new ByteArrayOutputStream(); IFile descriptionFile = target.getFile(IProjectDescription.DESCRIPTION_FILE_NAME); try { new ModelObjectWriter().write(description, out, FileUtil.getLineSeparator(descriptionFile)); } catch (IOException e) { String msg = NLS.bind(Messages.resources_writeMeta, target.getFullPath()); throw new ResourceException(IResourceStatus.FAILED_WRITE_METADATA, target.getFullPath(), msg, e); } byte[] newContents = out.toByteArray(); if (!descriptionFile.exists()) workspace.createResource(descriptionFile, false); else { if (!descriptionChanged(descriptionFile, newContents)) return false; } ByteArrayInputStream in = new ByteArrayInputStream(newContents); IFileStore descriptionFileStore = ((Resource) descriptionFile).getStore(); IFileInfo fileInfo = descriptionFileStore.fetchInfo(); if (fileInfo.exists() && Platform.getOS().equals(Platform.OS_WIN32)) { fileInfo.setAttribute(EFS.ATTRIBUTE_HIDDEN, false); descriptionFileStore.putInfo(fileInfo, EFS.SET_ATTRIBUTES, Policy.monitorFor(null)); } if (fileInfo.getAttribute(EFS.ATTRIBUTE_READ_ONLY)) { IStatus result = getWorkspace().validateEdit(new IFile[] {descriptionFile}, null); if (!result.isOK()) throw new ResourceException(result); fileInfo = descriptionFileStore.fetchInfo(); } write(descriptionFile, in, fileInfo, IResource.FORCE, false, Policy.monitorFor(null)); workspace.getAliasManager().updateAliases(descriptionFile, getStore(descriptionFile), IResource.DEPTH_ZERO, Policy.monitorFor(null)); long lastModified = ((Resource) descriptionFile).getResourceInfo(false, false).getLocalSyncInfo(); ResourceInfo info = ((Resource) target).getResourceInfo(false, true); updateLocalSync(info, lastModified); getWorkspace().getMetaArea().clearOldDescription(target); return true; }