Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / Psh / Builtins / Drives.pm
CommitLineData
86530b38
AT
1package Psh::Builtins::Drives;
2
3require Psh::Util;
4
5=item * C<drives>
6
7Prints a list of the available drives on Windows or nothing on windows
8
9=cut
10
11
12sub bi_drives
13{
14 if ($^O eq 'MSWin32') {
15 # I do not particularly like platform dependant code here
16 # On the other hand I also dislike filling the Psh::OS module
17 # with stuff for highly optional builtins
18 my @result=();
19 eval "use Win32::NetAdmin;";
20 Win32::NetAdmin::GetServerDisks("",\@result);
21 Psh::Util::print_out($_."\n") foreach @result;
22 } else {
23 }
24 return (1,undef);
25}
26
271;