Formats/Formats/FileSystemTypes.formats.ps1xml

<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
  <SelectionSets>
    <SelectionSet>
      <Name>FileSystemTypes</Name>
      <Types>
        <TypeName>System.IO.DirectoryInfo</TypeName>
        <TypeName>System.IO.FileInfo</TypeName>
      </Types>
    </SelectionSet>
  </SelectionSets>
  <!-- ################ CONTROL DEFINITIONS ################ -->
  <Controls>
    <Control>
      <Name>FileSystemTypes-GroupingFormat</Name>
      <CustomControl>
        <CustomEntries>
          <CustomEntry>
            <CustomItem>
              <Frame>
                <LeftIndent>4</LeftIndent>
                <CustomItem>
                  <Text>Directory </Text>
                  <ExpressionBinding>
                    <ScriptBlock>
                    $_.PSParentPath.Replace("Microsoft.PowerShell.Core\FileSystem::","")
                    </ScriptBlock>
                  </ExpressionBinding>
                  <NewLine/>
                </CustomItem>
              </Frame>
            </CustomItem>
          </CustomEntry>
        </CustomEntries>
      </CustomControl>
    </Control>
  </Controls>
  <ViewDefinitions>
    <View>
      <Name>colors</Name>
      <ViewSelectedBy>
        <SelectionSetName>FileSystemTypes</SelectionSetName>
      </ViewSelectedBy>
      <GroupBy>
        <PropertyName>PSParentPath</PropertyName>
        <CustomControlName>FileSystemTypes-GroupingFormat</CustomControlName>
      </GroupBy>
      <TableControl>
        <TableHeaders>
          <TableColumnHeader>
            <Label>Mode</Label>
            <Width>7</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>LastWriteTime</Label>
            <Width>25</Width>
            <Alignment>right</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Length</Label>
            <Width>14</Width>
            <Alignment>right</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Name</Label>
          </TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <Wrap/>
            <TableColumnItems>
              <TableColumnItem>
                <PropertyName>Mode</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                  <ScriptBlock>
                      [Humanizer.DateHumanizeExtensions]::Humanize($_.LastWriteTime,$false)
                  </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                  <ScriptBlock>
                      if (-not $_.PSIsContainer) { [Humanizer.ByteSizeExtensions]::bytes($_.Length).ToString(0.00)}
                  </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>
                  Format-TerminalIcons $_
                </ScriptBlock>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
    <View>
      <Name>colors</Name>
      <ViewSelectedBy>
        <SelectionSetName>FileSystemTypes</SelectionSetName>
      </ViewSelectedBy>
      <GroupBy>
        <PropertyName>PSParentPath</PropertyName>
        <CustomControlName>FileSystemTypes-GroupingFormat</CustomControlName>
      </GroupBy>
      <WideControl>
        <WideEntries>
          <WideEntry>
            <WideItem>
              <PropertyName>Name</PropertyName>
            </WideItem>
          </WideEntry>
          <WideEntry>
            <EntrySelectedBy>
              <TypeName>System.IO.FileInfo</TypeName>
            </EntrySelectedBy>
            <WideItem>
              <ScriptBlock>
                Format-TerminalIcons $_
              </ScriptBlock>
            </WideItem>
          </WideEntry>
        </WideEntries>
      </WideControl>
    </View>
  </ViewDefinitions>
</Configuration>