file_type 1.0.4

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 79

file_type

Checks the type(s) of a file. For example, .circleci.yml is either .yml, or .circleci.yml.

This project has been deprecated because it makes no sense adding a dependency for such a small "feature" (the String.endswith function accomplishes roughly the same things as this package does).

v1.0.4

  • Deprecated project

v1.0.2

  • Fixed documentation

v1.0.1

  • Fixed documentation

v1.0.0

  • First release

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}');
      }
    });

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  file_type: ^1.0.4

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:file_type/file_type.dart';
  
Version Uploaded Documentation Archive
1.0.4 Oct 19, 2018 Go to the documentation of file_type 1.0.4 Download file_type 1.0.4 archive
1.0.3 Jul 19, 2018 Go to the documentation of file_type 1.0.3 Download file_type 1.0.3 archive
1.0.2 Jul 19, 2018 Go to the documentation of file_type 1.0.2 Download file_type 1.0.2 archive
1.0.1 Jul 18, 2018 Go to the documentation of file_type 1.0.1 Download file_type 1.0.1 archive
1.0.0 Jul 18, 2018 Go to the documentation of file_type 1.0.0 Download file_type 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
66
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
79
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:file_type/file_type.dart.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.65.0 <3.0.0
Dev dependencies
link_checker ^1.1.0
test ^1.3.0