vsm :: FileIndex :: index_file
path
.Return the created document or null if path
is not accepted by accept_file
.
See index_document
.
# Index a file from its `path`.
#
# Return the created document or null if `path` is not accepted by `accept_file`.
#
# See `index_document`.
fun index_file(path: String, auto_update: nullable Bool): nullable DOC do
if not accept_file(path) then return null
var vector = parse_file(path)
var doc = new Document(path, path, vector)
index_document(doc, auto_update)
return doc
end
lib/vsm/vsm.nit:259,2--270,4