A framework for building convergent cross-platform Nextcloud clients using Flutter.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.2 KiB

part of '../neon_files.dart';
2 years ago
@immutable
2 years ago
class FileDetails {
const FileDetails({
2 years ago
required this.path,
required this.isDirectory,
required this.size,
required this.etag,
required this.mimeType,
required this.lastModified,
required this.hasPreview,
required this.isFavorite,
});
FileDetails.fromWebDav({
required final WebDavFile file,
required final List<String> path,
}) : path = List.from(path)..add(file.name),
isDirectory = file.isDirectory,
size = file.size,
etag = file.etag,
mimeType = file.mimeType,
lastModified = file.lastModified,
hasPreview = file.hasPreview,
isFavorite = file.favorite;
FileDetails.fromUploadTask({
required final UploadTask task,
}) : path = task.path,
size = task.size,
lastModified = task.lastModified,
isDirectory = false,
etag = null,
mimeType = null,
hasPreview = null,
isFavorite = null;
2 years ago
String get name => path.last;
final List<String> path;
final bool isDirectory;
final int? size;
2 years ago
final String? etag;
final String? mimeType;
final DateTime? lastModified;
2 years ago
final bool? hasPreview;
final bool? isFavorite;
}