Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.ResourceAttributes


    TarEntry newEntry = new TarEntry(destinationPath);
    if (resource.getLocalTimeStamp() != IResource.NULL_STAMP) {
      newEntry.setTime(resource.getLocalTimeStamp() / 1000);
    }
    ResourceAttributes attributes = resource.getResourceAttributes();
    if (attributes != null && attributes.isExecutable()) {
      newEntry.setMode(newEntry.getMode() | 0111);
    }
    if (attributes != null && attributes.isReadOnly()) {
      newEntry.setMode(newEntry.getMode() & ~0222);
    }

    final URI location = resource.getLocationURI();
    if (location == null) {
View Full Code Here


      throws IOException, CoreException {
    TarEntry newEntry = new TarEntry(destinationPath);
    if (resource.getLocalTimeStamp() != IResource.NULL_STAMP) {
      newEntry.setTime(resource.getLocalTimeStamp() / 1000);
    }
    ResourceAttributes attributes = resource.getResourceAttributes();
    if (attributes != null && attributes.isExecutable()) {
      newEntry.setMode(newEntry.getMode() | 0111);
    }
    if (attributes != null && attributes.isReadOnly()) {
      newEntry.setMode(newEntry.getMode() & ~0222);
    }

    final URI location = resource.getLocationURI();
    if (location == null) {
View Full Code Here

  private Preferences getPreferences() {
    return PreferencesFactory.getProjectPreferences( project );
  }

  private static ResourceAttributes readOnly() {
    ResourceAttributes resourceAttributes = new ResourceAttributes();
    resourceAttributes.setReadOnly( true );
    return resourceAttributes;
  }
View Full Code Here

   * Converts an IFileInfo object into a ResourceAttributes object.
   * @param fileInfo The file info
   * @return The resource attributes
   */
  public static ResourceAttributes fileInfoToAttributes(IFileInfo fileInfo) {
    ResourceAttributes attributes = new ResourceAttributes();
    attributes.setReadOnly(fileInfo.getAttribute(EFS.ATTRIBUTE_READ_ONLY));
    attributes.setArchive(fileInfo.getAttribute(EFS.ATTRIBUTE_ARCHIVE));
    attributes.setExecutable(fileInfo.getAttribute(EFS.ATTRIBUTE_EXECUTABLE));
    attributes.setHidden(fileInfo.getAttribute(EFS.ATTRIBUTE_HIDDEN));
    return attributes;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.resources.ResourceAttributes

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.