file_type 1.0.6 copy "file_type: ^1.0.6" to clipboard
file_type: ^1.0.6 copied to clipboard

Gets the type of a file

example/main.dart

import 'dart:io';

import 'package:file_type/file_type.dart';

main() => Directory.current.list(recursive: true).listen((entity) {
      if (entity is File && getLastFileType(entity.path) == '.dart') {
        print('Dart file found! ${entity.path}');
      }
    });
0
likes
20
points
71
downloads

Publisher

unverified uploader

Weekly Downloads

Gets the type of a file

Repository (GitHub)
View/report issues

More

Packages that depend on file_type