drive-strings: add a demo vocab for GetLogicalDriveStrings to extra

master
Alexander Iljin 2019-08-09 08:20:00 +02:00 committed by John Benediktsson
parent c98b49aaf4
commit 97b07d9972
3 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1 @@
Alexander Ilin

View File

@ -0,0 +1,9 @@
! Copyright (C) 2019 Alexander Ilin.
! See http://factorcode.org/license.txt for BSD license.
USING: byte-arrays io.encodings.string io.encodings.utf16
kernel math sequences splitting windows.kernel32 ;
IN: drive-strings
: logical-drive-strings ( -- seq )
30 4 2 * * dup <byte-array> [ GetLogicalDriveStrings ] keep
utf16le decode swap head "\0" split harvest ;

View File

@ -0,0 +1 @@
windows