Skip to content

Instantly share code, notes, and snippets.

@asterite
Created March 17, 2015 23:11
Show Gist options
  • Select an option

  • Save asterite/2a8e0deebefb788dda2b to your computer and use it in GitHub Desktop.

Select an option

Save asterite/2a8e0deebefb788dda2b to your computer and use it in GitHub Desktop.
lib LibC
ifdef windows
fun find_first_file = FindFirstFile(...) : Dir*
fun opendir(name : UInt8) : Dir*
find_first_file(name, ...)
end
else
fun opendir(name : UInt8*) : Dir*
end
end
class Dir
def initialize(@path)
@dir = LibC.opendir(@path)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment