Implement a very basic file system view

This will show all the files and not just the "notes". This way the user
can easily figure out why a file isn't included in the list of notes.

It's currently disabled by default as it clearly needs a lot more work.
This commit is contained in:
Vishesh Handa
2020-06-10 00:47:54 +02:00
parent d6a288c085
commit 267ecb7499
9 changed files with 233 additions and 5 deletions

View File

@ -102,6 +102,21 @@ class GitNoteRepository {
return NoteRepoResult(noteFilePath: newFullPath, error: false);
}
Future<NoteRepoResult> renameFile(
String oldFullPath,
String newFullPath,
) async {
// FIXME: This is a hacky way of adding the changes, ideally we should be calling rm + add or something
await _gitRepo.add(".");
await _gitRepo.commit(
message: "Renamed File",
authorEmail: Settings.instance.gitAuthorEmail,
authorName: Settings.instance.gitAuthor,
);
return NoteRepoResult(noteFilePath: newFullPath, error: false);
}
Future<NoteRepoResult> moveNote(
String oldFullPath,
String newFullPath,