Created
August 1, 2014 17:56
-
-
Save soumith/f4dd3ee76c8251f6e91a 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
require 'paths' | |
local current_dir = 'torch7' | |
checkFile = function( current_dir ) | |
local list = paths.dir( current_dir ) | |
table.sort(list, function (a,b) return a<b end) | |
for i = 3, #list do | |
list[i] = paths.concat(current_dir, list[i]) | |
if paths.filep( list[i] )then | |
print( ' ==> found file '.. list[i] ) | |
else | |
print( '==> check sub directory ' .. list[i]) | |
end | |
end | |
end | |
checkFile(current_dir); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For someone new to
paths
tips are here