Files
GitJournal/lib/core/file/unopened_files.dart
Vishesh Handa e1ea7a4953 Fetch the modified + created time from git
Fixes #78

This is probably the largest commit that I have ever made. From now on -
every File always has an mtime and ctime which is fetched from git.
Notes can optionally override that time by providing yaml metadata.

Additionally the 'filePath' and 'folderPath' is now relative to the
repoPath instead of being the full path.

This will slow down GitJournal like crazy as all the mtimes and ctime
still need to be cached. For my test repo it takes about 23 seconds for
GitJournal to become responsive.
2021-10-26 17:49:08 +02:00

25 lines
573 B
Dart

/*
* SPDX-FileCopyrightText: 2019-2021 Vishesh Handa <me@vhanda.in>
*
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import 'package:gitjournal/core/folder/notes_folder_fs.dart';
import 'file.dart';
class UnopenedFile extends File {
NotesFolderFS parent;
UnopenedFile({
required File file,
required this.parent,
}) : super(
oid: file.oid,
filePath: file.filePath,
repoPath: file.repoPath,
modified: file.modified,
created: file.created,
fileLastModified: file.fileLastModified,
);
}