48 lines
1.6 KiB
Java
48 lines
1.6 KiB
Java
package p.studio.vfs;
|
|
|
|
import p.studio.vfs.messages.*;
|
|
|
|
import java.nio.file.Path;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
public interface VfsProjectDocument extends AutoCloseable {
|
|
VfsProjectContext projectContext();
|
|
|
|
VfsProjectSnapshot snapshot();
|
|
|
|
VfsProjectSnapshot refresh();
|
|
|
|
VfsProjectSnapshot refresh(VfsRefreshRequest request);
|
|
|
|
VfsDocumentOpenResult openDocument(Path path);
|
|
|
|
default VfsDocumentAccessContext accessContext(final Path path) {
|
|
throw new UnsupportedOperationException("Document access context is not supported by this VFS implementation.");
|
|
}
|
|
|
|
default VfsDocumentAccessContext updateAccessContext(final Path path, final Map<String, String> attributes) {
|
|
throw new UnsupportedOperationException("Document access context updates are not supported by this VFS implementation.");
|
|
}
|
|
|
|
default VfsDocumentOpenResult.VfsTextDocument updateDocument(final Path path, final String content) {
|
|
throw new UnsupportedOperationException("Document mutation is not supported by this VFS implementation.");
|
|
}
|
|
|
|
default VfsDocumentSaveResult saveDocument(final Path path) {
|
|
throw new UnsupportedOperationException("Document save is not supported by this VFS implementation.");
|
|
}
|
|
|
|
default VfsDocumentOpenResult.VfsTextDocument discardDocument(final Path path) {
|
|
throw new UnsupportedOperationException("Document discard is not supported by this VFS implementation.");
|
|
}
|
|
|
|
default List<VfsDocumentSaveResult> saveAllDocuments() {
|
|
return List.of();
|
|
}
|
|
|
|
@Override
|
|
default void close() {
|
|
}
|
|
}
|