mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
17 lines
368 B
CoffeeScript
17 lines
368 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
|
|
App.factory 'files', (ide) ->
|
|
|
|
Files =
|
|
getTeXFiles: () ->
|
|
texFiles = []
|
|
ide.fileTreeManager.forEachEntity (entity, folder, path) ->
|
|
if entity.type == 'doc' && entity?.name?.match?(/.*\.(tex|txt|md)/)
|
|
cloned = _.clone(entity)
|
|
cloned.path = path
|
|
texFiles.push cloned
|
|
return texFiles
|
|
|
|
return Files
|