6 Dir
.entries(session
[:current_dir]).select
{|f
| File
.file
? f
}.sort_by
{|f
| file_sort_key f
}
9 def files_for_today(current_file
)
10 if File
.exists
?(current_file
)
11 day
= File
.mtime(current_file
).to_date
12 files_in_dir
.select
{|f
| File
.mtime(f
).to_date
== day
}
18 i
= fid
.find_index(file
)
19 if i
&& i
< fid
.length
24 def previous_file(file
)
26 i
= fid
.find_index(file
)
32 def file_sort_key(file
)
33 File
.mtime(file
).to_s
+ file