tangled
alpha
login
or
join now
helpimnotdrowning.net
/
Utatane
0
fork
atom
Nice little directory browser :D
0
fork
atom
overview
issues
pulls
pipelines
api/files: revert field names to PascalCase
helpimnotdrowning
3 months ago
80b52877
c23a4fd3
+5
-4
1 changed file
expand all
collapse all
unified
split
views
api
files.json.ps1
+5
-4
views/api/files.json.ps1
···
22
22
$CurrentPath = ($WebEvent.Query.Path -eq '/') ? "" : $WebEvent.Query.Path
23
23
$JoinedPath = $Data.JoinedPath
24
24
25
25
+
<# ### ### ### #>
25
26
Get-ChildItem -Lit $JoinedPath | ? { -not (_check_path_on_blacklist $_) } | % {
26
27
# bug ????
27
28
if ($_ -isnot [IO.FileSystemInfo]) {
···
31
32
$is_file = _is_file $_
32
33
33
34
@{
34
34
-
type = $is_file ? 'file' : 'directory'
35
35
-
name = $_.Name
36
36
-
size = $is_file ? $_.size : $null # check if works for symlinks!!
37
37
-
last_modified = [uint64](Get-Date $_.LastWriteTime -UFormat '%s' -AsUTC)
35
35
+
Type = $is_file ? 'file' : 'directory'
36
36
+
Name = $_.Name
37
37
+
Size = $is_file ? $_.size : $null # check if works for symlinks!!
38
38
+
LastModified = [uint64](Get-Date $_.LastWriteTime -UFormat '%s' -AsUTC)
38
39
}
39
40
}