aboutsummaryrefslogtreecommitdiff
path: root/src/text
diff options
context:
space:
mode:
Diffstat (limited to 'src/text')
-rw-r--r--src/text/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/text/mod.rs b/src/text/mod.rs
index dd969af..c3fd8f6 100644
--- a/src/text/mod.rs
+++ b/src/text/mod.rs
@@ -36,6 +36,9 @@ lazy_static! {
}
+/// Extract text from files if there is an extractor.
+/// If there is an error like `permission denied` or there
+/// is no extractor this function returns a empty string.
pub fn extract_text(path : &str) -> String {
let p = Path::new(&path);
let extenstion = p.extension().unwrap_or_else(|| OsStr::new("")).to_str().unwrap();