Modules/FileSystem/Pscx.FileSystem.Format.5.0.ps1xml

<Configuration>
  <Controls>
    <Control>
      <Name>HashInfo-GroupingFormat</Name>
      <CustomControl>
        <CustomEntries>
          <CustomEntry>
            <CustomItem>
              <Frame>
                <LeftIndent>4</LeftIndent>
                <CustomItem>
                  <Text>Algorithm: </Text>
                  <ExpressionBinding>
                    <ScriptBlock>$_.Algorithm</ScriptBlock>
                  </ExpressionBinding>
                </CustomItem>
              </Frame>
            </CustomItem>
          </CustomEntry>
        </CustomEntries>
      </CustomControl>
    </Control>
  </Controls>
 
  <ViewDefinitions>
    <View>
      <Name>drives</Name>
      <ViewSelectedBy>
        <TypeName>System.IO.DriveInfo</TypeName>
      </ViewSelectedBy>
      <TableControl>
        <TableHeaders>
 
          <TableColumnHeader>
            <Label>VolumeLabel</Label>
            <Width>18</Width>
          </TableColumnHeader>
 
          <TableColumnHeader>
            <Label>Name</Label>
            <Width>4</Width>
          </TableColumnHeader>
 
          <TableColumnHeader>
            <Label>UsedSpace</Label>
            <Width>18</Width>
            <Alignment>right</Alignment>
          </TableColumnHeader>
 
          <TableColumnHeader>
            <Label>FreeSpace</Label>
            <Width>18</Width>
            <Alignment>right</Alignment>
          </TableColumnHeader>
 
          <TableColumnHeader>
            <Label>TotalSize</Label>
            <Width>11</Width>
            <Alignment>right</Alignment>
          </TableColumnHeader>
 
          <TableColumnHeader>
            <Label>%Free</Label>
            <Width>5</Width>
            <Alignment>right</Alignment>
          </TableColumnHeader>
 
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <TableColumnItems>
              <TableColumnItem>
                <ScriptBlock>
                  if ($_.VolumeLabel.Length -gt 0) {
                  return $_.VolumeLabel
                  }
                  'Local Disk'
                </ScriptBlock>
              </TableColumnItem>
 
              <TableColumnItem>
                <PropertyName>Name</PropertyName>
              </TableColumnItem>
 
              <TableColumnItem>
                <ScriptBlock>
                  if ($Pscx:Preferences['FileSizeInUnits']) {
                  return $_.UsedSpace | format-byte
                  }
                  '{0:N0}' -f $_.UsedSpace
                </ScriptBlock>
              </TableColumnItem>
 
              <TableColumnItem>
                <ScriptBlock>
                  if ($Pscx:Preferences['FileSizeInUnits']) {
                  return $_.FreeSpace | format-byte
                  }
                  '{0:N0}' -f ($_.FreeSpace)
                </ScriptBlock>
              </TableColumnItem>
 
              <TableColumnItem>
                <ScriptBlock>
                  $_.TotalSize | format-byte
                </ScriptBlock>
              </TableColumnItem>
 
              <TableColumnItem>
                <ScriptBlock>'{0:0} %' -f (100 * ([float]$_.FreeSpace / [float]$_.TotalSize))</ScriptBlock>
              </TableColumnItem>
 
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
 
    <View>
      <Name>LinkReparsePointInfo</Name>
      <ViewSelectedBy>
        <TypeName>Pscx.IO.Ntfs.LinkReparsePointInfo</TypeName>
      </ViewSelectedBy>
 
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem>
                <PropertyName>ReparsePointTag</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>Path</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>Target</PropertyName>
              </ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>
 
    <View>
      <Name>Pscx.Commands.IO.HashInfo</Name>
      <ViewSelectedBy>
        <TypeName>Pscx.Commands.IO.HashInfo</TypeName>
      </ViewSelectedBy>
      <GroupBy>
        <PropertyName>Algorithm</PropertyName>
        <CustomControlName>HashInfo-GroupingFormat</CustomControlName>
      </GroupBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem>
                <PropertyName>Path</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>HashString</PropertyName>
              </ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>
 
    <View>
      <Name>Pscx.Commands.IO.ShortPathInfo</Name>
      <ViewSelectedBy>
        <TypeName>Pscx.Commands.IO.ShortPathInfo</TypeName>
      </ViewSelectedBy>
      <TableControl>
        <TableHeaders>
          <TableColumnHeader>
            <Label>ShortPath</Label>
            <Width>12</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Path</Label>
            <Alignment>left</Alignment>
          </TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <TableColumnItems>
              <TableColumnItem>
                <ScriptBlock>[System.IO.Path]::GetFileName($_.ShortPath)</ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>Path</PropertyName>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
  </ViewDefinitions>
</Configuration>