From c2e78f9786e0c48945050a84acaa560d3d8751f8 Mon Sep 17 00:00:00 2001 From: marlon-erler Date: Mon, 22 Jul 2024 11:57:47 +0200 Subject: [PATCH] reorganize --- src/Model/Files/fileModel.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Model/Files/fileModel.ts b/src/Model/Files/fileModel.ts index 71bdcf6c..b165c9cf 100644 --- a/src/Model/Files/fileModel.ts +++ b/src/Model/Files/fileModel.ts @@ -79,11 +79,6 @@ export default class FileModel { return this.storageModel.list(this.getBasePath()); }; - listFileContents = (file: File): string[] => { - const filePath: string[] = this.getFilePath(file.id); - return this.storageModel.list(filePath); - }; - getFile = (fileId: string): File | null => { const filePath = this.getFilePath(fileId); const fileOrNull: File | null = this.storageModel.readStringifiable( @@ -93,6 +88,11 @@ export default class FileModel { return fileOrNull; }; + listFileContents = (file: File): string[] => { + const filePath: string[] = this.getFilePath(file.id); + return this.storageModel.list(filePath); + }; + getLatestFileContentName = (fileContentNames: string[]): string | null => { return fileContentNames[fileContentNames.length - 1]; };