summaryrefslogtreecommitdiffstats
path: root/lib/private/preview/txt.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/preview/txt.php')
-rw-r--r--lib/private/preview/txt.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/preview/txt.php b/lib/private/preview/txt.php
index 063543c6279..b81436baa06 100644
--- a/lib/private/preview/txt.php
+++ b/lib/private/preview/txt.php
@@ -14,6 +14,16 @@ class TXT extends Provider {
}
/**
+ * Check if a preview can be generated for $path
+ *
+ * @param \OC\Files\FileInfo $file
+ * @return bool
+ */
+ public function isAvailable($file) {
+ return $file->getSize() > 5;
+ }
+
+ /**
* @param string $path
* @param int $maxX
* @param int $maxY