This commit is contained in:
Andrew Pareles 2025-02-09 00:46:39 -08:00
parent e46b295449
commit 9cbe83b57c

View file

@ -3,7 +3,7 @@ import { EndOfLinePreference } from '../../../../../editor/common/model'
import { IModelService } from '../../../../../editor/common/services/model.js'
import { IFileService } from '../../../../../platform/files/common/files'
// read files from VSCode (looks like only works if model exists already, use raw if not)
// read files from VSCode. preferred (but appears to only work if the model of this URI already exists. If it doesn't use the other function.)
export const VSReadFile = async (modelService: IModelService, uri: URI): Promise<string | null> => {
const model = modelService.getModel(uri)
if (!model) return null