]> gitweb.factorcode.org Git - factor.git/blob - extra/windows/drive-strings/drive-strings.factor
Switch to https urls
[factor.git] / extra / windows / drive-strings / drive-strings.factor
1 ! Copyright (C) 2019 Alexander Ilin.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: byte-arrays io.encodings.string io.encodings.utf16
4 kernel math sequences splitting windows.kernel32 ;
5 IN: windows.drive-strings
6
7 : logical-drive-strings ( -- seq )
8     30 4 2 * * dup <byte-array> [ GetLogicalDriveStrings ] keep
9     utf16le decode swap head "\0" split harvest ;