We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b044eef commit 8f33dacCopy full SHA for 8f33dac
src/Service/FileManagerService.php
@@ -151,6 +151,17 @@ public function getMimeType(string $key): string|array|null
151
return $this->mimeTypes[$key] ?? null;
152
}
153
154
+ public function getMimeContent(string $relativeFile): string
155
+ {
156
+ return mime_content_type($this->getKernelDirectory() . $relativeFile);
157
+ }
158
+
159
+ public function getFileContent(string $relativeFile): string
160
161
+ // return $this->filesystem->readFile($this->getKernelDirectory() . $relativeFile);
162
+ return file_get_contents($this->getKernelDirectory() . $relativeFile);
163
164
165
public function exists(string $filePath, bool $absolute = false): bool
166
{
167
if ($absolute) {
0 commit comments