| Constructor and Description |
|---|
TextFileStoreSnapshot(org.eclipse.core.filesystem.IFileStore fileStore)
Constructs a new snapshot of the given text file store.
|
TextFileStoreSnapshot(org.eclipse.core.filesystem.IFileStore fileStore,
java.nio.charset.Charset charset)
Constructs a new snapshot of the given text file store using the given
charset for decoding the file store's contents.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists()
Returns whether the file existed at the moment this snapshot was taken.
|
java.lang.String |
getContents()
A snapshot returns the same contents until it expires.
|
org.eclipse.core.runtime.IStatus |
getStatus()
Returns whether an I/O error was encountered while reading the file.
|
protected java.lang.Boolean |
predictEquality(Snapshot other)
|
public TextFileStoreSnapshot(org.eclipse.core.filesystem.IFileStore fileStore)
fileStore - must not be nullpublic TextFileStoreSnapshot(org.eclipse.core.filesystem.IFileStore fileStore,
java.nio.charset.Charset charset)
fileStore - must not be nullcharset - must not be nullpublic java.lang.String getContents()
ISnapshotnull.
Protractedly holding on to the returned contents is not recommended, as it may potentially consume significant amount of space.
null if
the snapshot has expiredpublic org.eclipse.core.runtime.IStatus getStatus()
public boolean exists()
true if the file existed at the moment this snapshot
was taken, and false otherwiseprotected java.lang.Boolean predictEquality(Snapshot other)
Snapshotequal to
the given snapshot without actually obtaining snapshot contents. Must return null if cannot tell for sure. Any non-null
result must meet the contract of ISnapshot.isEqualTo(ISnapshot).predictEquality in class Snapshotother - the other snapshot (not null
and not identical to the receiver)true if the snapshots are predicted to be equal,
false if the snapshots are predicted to be unequal,
and null if there is no predictionCopyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0