Skip to content

Commit 8f33dac

Browse files
authored
Update FileManagerService.php
1 parent b044eef commit 8f33dac

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Service/FileManagerService.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,17 @@ public function getMimeType(string $key): string|array|null
151151
return $this->mimeTypes[$key] ?? null;
152152
}
153153

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+
154165
public function exists(string $filePath, bool $absolute = false): bool
155166
{
156167
if ($absolute) {

0 commit comments

Comments
 (0)