forked from hypar-io/BuildingBlocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGetProjectList.dib
19 lines (14 loc) · 1.04 KB
/
GetProjectList.dib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!meta
{"kernelInfo":{"defaultKernelName":null,"items":[{"name":"csharp","languageName":"C#","aliases":["c#","cs"]},{"name":"fsharp","languageName":"F#","aliases":["f#","fs"]},{"name":"pwsh","languageName":"PowerShell","aliases":["powershell"]},{"name":"javascript","languageName":"JavaScript","aliases":["js"]},{"name":"html","languageName":"HTML"},{"name":"sql","languageName":"SQL"},{"name":"kql","languageName":"KQL"},{"name":"mermaid","languageName":"Mermaid"},{"name":"httpRequest","languageName":"http"},{"name":"value"}]}}
#!markdown
# Get Project List
This small script in the form of a .Net interactive notebook looks in this directory to find all Hypar functions. It lists each function's root directory in a form that can be easily copy-pasted into `update-all.sh`.
#!csharp
using System.IO;
// get all directories recursively
var directories = Directory.GetDirectories(@"./", "*.*", SearchOption.AllDirectories);
foreach(var dir in directories) {
if(File.Exists(Path.Combine(dir, "hypar.json"))) {
Console.WriteLine($"\"{dir}\"");
}
}