summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Files/IMimeTypeDetector.php10
-rw-r--r--lib/public/WorkflowEngine/IFileCheck.php5
2 files changed, 13 insertions, 2 deletions
diff --git a/lib/public/Files/IMimeTypeDetector.php b/lib/public/Files/IMimeTypeDetector.php
index 3d26860c744..3686405b529 100644
--- a/lib/public/Files/IMimeTypeDetector.php
+++ b/lib/public/Files/IMimeTypeDetector.php
@@ -40,10 +40,18 @@ interface IMimeTypeDetector {
* @param string $path
* @return string
* @since 8.2.0
- **/
+ */
public function detectPath($path);
/**
+ * detect mimetype only based on the content of file
+ * @param string $path
+ * @return string
+ * @since 18.0.0
+ */
+ public function detectContent(string $path): string;
+
+ /**
* detect mimetype based on both filename and content
*
* @param string $path
diff --git a/lib/public/WorkflowEngine/IFileCheck.php b/lib/public/WorkflowEngine/IFileCheck.php
index 07626a0071d..546b72fa2dc 100644
--- a/lib/public/WorkflowEngine/IFileCheck.php
+++ b/lib/public/WorkflowEngine/IFileCheck.php
@@ -37,8 +37,11 @@ use OCP\Files\Storage\IStorage;
*/
interface IFileCheck extends IEntityCheck {
/**
+ * @param IStorage $storage
+ * @param string $path
+ * @param bool $isDir
* @since 18.0.0
*/
- public function setFileInfo(IStorage $storage, string $path);
+ public function setFileInfo(IStorage $storage, string $path, bool $isDir = false): void;
}