folder creation in statistique
This commit is contained in:
parent
c3d09507b9
commit
9a16432f91
@ -78,9 +78,15 @@ class ExportThanatoStatisticService {
|
||||
$thanatoFolder = $racineFolder.'STATISTIQUES/THANATOS/';
|
||||
$fileHeader = $this->getExportThanatoFileHeader();
|
||||
$fileContent = $this->populateExportDataIntoFileContent($exportData,$fileHeader);
|
||||
$storage = $this->rootFolder->getUserFolder($idNextcloud);
|
||||
try{
|
||||
$storage->newFolder($thanatoFolder);
|
||||
}
|
||||
catch(\OCP\Files\NotPermittedException $e) {
|
||||
|
||||
}
|
||||
$filename = $this->getFilename($thanato["nom"],$thanato["prenom"],$month,$year);
|
||||
$fileNamePath = $thanatoFolder."STAT-THANATO-" . $filename . '.csv';
|
||||
$storage = $this->rootFolder->getUserFolder($idNextcloud);
|
||||
$storage->newFile($fileNamePath);
|
||||
$file = $storage->get($fileNamePath);
|
||||
$file->putContent($fileContent);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user