t×tecexpressby TeKOcloud
DEv0.7.1
API & types / FLUTTER

TxFileEntry.

File/directory metadata with a stable ID; a null parentId denotes the root directory.

Dart copyWith preserves omitted fields; root: true explicitly sets parentId to null. Passing parentId: null alone preserves the existing parent.

TxFileEntry

ParameterTypeDefaultMeaning
idStringrequiredUnique stable ID.
nameStringrequiredInput field name or file name.
parentIdString?nullParent directory ID; null denotes the root.
isDirectoryboolfalseIdentifies a directory.
sizeint0File size in bytes.
modifiedDateTime?nullLast modification time.
bytesUint8List?nullFile contents in memory.
Member / type / returnMeaning
TxFileEntry copyWith({String? id, String? name, String? parentId, bool root = false})Creates a copy with the supplied changes; preserves other values.
dart
import 'package:tecexpress/tecexpress.dart';

Future<void> example() async {
  const entry = TxFileEntry(id: '1', name: 'hello.txt');
  print(entry.copyWith(name: 'renamed.txt').name);
}