mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-08-06 15:21:21 +08:00

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.
33 lines
659 B
Dart
33 lines
659 B
Dart
/*
|
|
* SPDX-FileCopyrightText: 2019-2021 Vishesh Handa <me@vhanda.in>
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
import '../file/file.dart';
|
|
|
|
enum IgnoreReason {
|
|
HiddenFile,
|
|
InvalidExtension,
|
|
InvalidEncoding,
|
|
Custom,
|
|
}
|
|
|
|
class IgnoredFile extends File {
|
|
final IgnoreReason reason;
|
|
final Object? customError;
|
|
|
|
IgnoredFile({
|
|
required File file,
|
|
required this.reason,
|
|
this.customError,
|
|
}) : super(
|
|
oid: file.oid,
|
|
filePath: file.filePath,
|
|
repoPath: file.repoPath,
|
|
modified: file.modified,
|
|
created: file.created,
|
|
fileLastModified: file.fileLastModified,
|
|
);
|
|
}
|