Created
March 17, 2015 23:09
-
-
Save asterite/7876faa5716c25d861db to your computer and use it in GitHub Desktop.
This file contains hidden or 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
lib LibC | |
fun opendir(name : UInt8*) : Dir* | |
fun find_first_file = FindFirstFile(...) : Dir* | |
end | |
class Dir | |
def initialize(@path) | |
ifdef windows | |
@dir = LibC.find_first_file(@path, ...) | |
else | |
@dir = LibC.opendir(@path) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment