{
	"name": "FireIde.API.Fs",
	"Web.Endpoint": "GET /fs/*",
	"json": {
		"@scopeSet(fsPath)": {
			"@index(express.req.params)": 0
		},
		"@equals": [
			{
				"@get(fsPath)": null
			},
			""
		],
		"@if": {
			"@set(fsPath)": "."
		},
		"@FireIde.Core.Fs.PathExists": {
			"@get(fsPath)": null
		},
		" @if": {
			"@FireIde.Core.Fs.PathIs(directory)": {
				"@get(fsPath)": null
			},
			"@if": {
				"@FireIde.Core.Fs.ReadDirectory": {
					"@get(fsPath)": null
				},
				"@each": {
					"@set(filePath)": {
						"@FireIde.Core.Path.Join": [
							{
								"@get(fsPath)": null
							},
							{
								"@get(CurrentItem)": null
							}
						]
					},
					"@return": {
						"path": {
							"@get(filePath)": null
						},
						"isDirectory": {
							"@FireIde.Core.Fs.PathIs(directory)": {
								"@get(filePath)": null
							}
						}
					}
				}
			},
			"@unless": {
				"@FireIde.Core.Fs.ReadFile": {
					"@get(fsPath)": null
				}
			}
		},
		"@unless": {
			"@Web.Response.Status": 404
		}
	}
}