Created
August 3, 2018 21:38
-
-
Save stevengj/b531d9ca79aa7e3934929c07ea853e90 to your computer and use it in GitHub Desktop.
appdata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function appdata() | |
path = zeros(UInt32, 300) | |
result = ccall((:SHGetFolderPathW,:shell32), stdcall, Cint, | |
(Ptr{Cvoid},Cint,Ptr{Cvoid},Cint,Ptr{UInt8}),C_NULL,0x0005,C_NULL,0,path) | |
return result == 0 ? transcode(String, resize!(path, findfirst(iszero, path)-1)) : homedir() | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment