| 77 | * @returns Returns the path as a string |
| 78 | */ |
| 79 | export const getPathDifference = (rootFolder: string, nestedFolder: string) => { |
| 80 | const rootParts = rootFolder.split("/"); |
| 81 | const nestedParts = nestedFolder.split("/"); |
| 82 | |
| 83 | let i = 0; |
| 84 | while (i < rootParts.length && i < nestedParts.length && rootParts[i] === nestedParts[i]) { |
| 85 | i++; |
| 86 | } |
| 87 | |
| 88 | const nestedPath = nestedParts.slice(i).join("/"); |
| 89 | return nestedPath; |
| 90 | }; |
| 91 | |
| 92 | export const updateFileDependencies = async (filePath: vscode.Uri, root: string, newFilePath: string) => { |
| 93 | // Read the contents of the file |