diff --git a/extra/drive-strings/authors.txt b/extra/drive-strings/authors.txt new file mode 100644 index 0000000000..8e1955f8e1 --- /dev/null +++ b/extra/drive-strings/authors.txt @@ -0,0 +1 @@ +Alexander Ilin diff --git a/extra/drive-strings/drive-strings.factor b/extra/drive-strings/drive-strings.factor new file mode 100644 index 0000000000..d436a8a6d5 --- /dev/null +++ b/extra/drive-strings/drive-strings.factor @@ -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 [ GetLogicalDriveStrings ] keep + utf16le decode swap head "\0" split harvest ; diff --git a/extra/drive-strings/platforms.txt b/extra/drive-strings/platforms.txt new file mode 100644 index 0000000000..8e1a55995e --- /dev/null +++ b/extra/drive-strings/platforms.txt @@ -0,0 +1 @@ +windows