1 11 package org.eclipse.core.resources; 12 13 import java.io.InputStream ; 14 import java.io.Reader ; 15 import java.net.URI ; 16 import org.eclipse.core.runtime.*; 17 import org.eclipse.core.runtime.content.IContentDescription; 18 import org.eclipse.core.runtime.content.IContentTypeManager; 19 20 40 public interface IFile extends IResource, IEncodedStorage, IAdaptable { 41 48 public int ENCODING_UNKNOWN = 0; 49 56 public int ENCODING_US_ASCII = 1; 57 65 public int ENCODING_ISO_8859_1 = 2; 66 73 public int ENCODING_UTF_8 = 3; 74 81 public int ENCODING_UTF_16BE = 4; 82 89 public int ENCODING_UTF_16LE = 5; 90 97 public int ENCODING_UTF_16 = 6; 98 99 139 public void appendContents(InputStream source, boolean force, boolean keepHistory, IProgressMonitor monitor) throws CoreException; 140 141 214 public void appendContents(InputStream source, int updateFlags, IProgressMonitor monitor) throws CoreException; 215 216 259 public void create(InputStream source, boolean force, IProgressMonitor monitor) throws CoreException; 260 261 329 public void create(InputStream source, int updateFlags, IProgressMonitor monitor) throws CoreException; 330 331 406 public void createLink(IPath localLocation, int updateFlags, IProgressMonitor monitor) throws CoreException; 407 408 482 public void createLink(URI location, int updateFlags, IProgressMonitor monitor) throws CoreException; 483 484 521 public void delete(boolean force, boolean keepHistory, IProgressMonitor monitor) throws CoreException; 522 523 551 public String getCharset() throws CoreException; 552 553 589 public String getCharset(boolean checkImplicit) throws CoreException; 590 591 619 public String getCharsetFor(Reader reader) throws CoreException; 620 621 647 public IContentDescription getContentDescription() throws CoreException; 648 649 664 public InputStream getContents() throws CoreException; 665 666 686 public InputStream getContents(boolean force) throws CoreException; 687 688 710 public int getEncoding() throws CoreException; 711 712 722 public IPath getFullPath(); 723 724 739 public IFileState[] getHistory(IProgressMonitor monitor) throws CoreException; 740 741 751 public String getName(); 752 753 761 public boolean isReadOnly(); 762 763 811 public void move(IPath destination, boolean force, boolean keepHistory, IProgressMonitor monitor) throws CoreException; 812 813 828 public void setCharset(String newCharset) throws CoreException; 829 830 859 public void setCharset(String newCharset, IProgressMonitor monitor) throws CoreException; 860 861 901 public void setContents(InputStream source, boolean force, boolean keepHistory, IProgressMonitor monitor) throws CoreException; 902 903 944 public void setContents(IFileState source, boolean force, boolean keepHistory, IProgressMonitor monitor) throws CoreException; 945 946 1015 public void setContents(InputStream source, int updateFlags, IProgressMonitor monitor) throws CoreException; 1016 1017 1084 public void setContents(IFileState source, int updateFlags, IProgressMonitor monitor) throws CoreException; 1085} 1086 | Popular Tags |