hi_files 0.2.0

  • README.md
  • Example
  • Installing
  • Versions
  • 29

hi_files

A simple library for get file-list of local disk.

Usage:

See example.dart.

Class

C_FileList : Get and keep local file list

  Metohds
        void setPath(String path, [List<String> ext])
            path: target path
            ext: target extentions (option)
        int getSync([num Mode])
            Get file list & parameters
            Mode:  1 = print mode for debug
            return: 0 = no error, -1 = Exception, -2 = other error
  Properties
    int filesCount: count of files
    int dirsCount: count of directorie
    List<String> targetExt: for selected file list
      <below are file list properties>
    List<String> filename
    List<String> directory
    List<String> extension
    List<DateTime> timeStamp
    List<int> type: 0 = directory , 1 = file

C_Files class is added options to C_FileList calss.

   Metohds
    int getList(String path, [List<String> ext])
        path: target path
        ext: target extentions (option)
    clear()
        all properties clear from file list
   Properies
    List<String> option: for use in other programs
    List<int> flg: for use in other programs

C_Log : keep log messages and save to local disk.

 constructor
        C_log(String log filename)

 Methods
        void add(String log message)
        int write()
            return: 0 = no error, -1 = Exception, -2 = other error

 Property
        List<String> log
            log messages

Version

0.2.0 Add 'clear' method and 'flg' property.
0.1.1 Add 'option' and 'type' properties.
0.1.0	New Release

example/example.dart

import '../lib/hi_files.dart';
// import 'package:hi_files/hi_files.dart';

main() {
	String path = 'E:\\Users\\Test';

	C_Files dir = new C_Files();
	dir.getList(path);
	print(dir.filesCount.toString() + ' files');
	print(dir.dirsCount.toString() + ' Directories');

	for (int i = 0; i < dir.filename.length; i++ ) {
		switch (dir.type[i]) {
			case 0:
				print('dir:' + dir.directory[i]);
				break;
			case 1:
				print('file:' + dir.filename[i]);
		}
	}

	dir.clear();
	List<String> extensions = ['xml', 'css'];
	dir.getList(path, extensions);
	print ('files:' + dir.filename.length.toString());
	for (int i = 0; i < dir.filename.length; i++) {
		if (dir.type[i] == 1) print(dir.filename[i]);
	}

}

1. Depend on it

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


dependencies:
  hi_files: "^0.2.0"

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 packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:hi_files/hi_files.dart';
        
Version Uploaded Documentation Archive
0.2.0 Mar 30, 2014 Go to the documentation of hi_files 0.2.0 Download hi_files 0.2.0 archive
0.1.1 Mar 29, 2014 Go to the documentation of hi_files 0.1.1 Download hi_files 0.1.1 archive
0.1.0 Mar 23, 2014 Go to the documentation of hi_files 0.1.0 Download hi_files 0.1.0 archive
0.1.1-a Mar 29, 2014 Go to the documentation of hi_files 0.1.1-a Download hi_files 0.1.1-a archive

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Jan 21, 2018
  • Dart: 2.0.0-dev.15.0
  • pana: 0.10.0

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
96 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0 / 100
Overall score:
Weighted score of the above. [more]
29

Platforms

Detected platforms: Flutter, other

Primary library: package:hi_files/hi_files.dart.

Suggestions

  • Maintain CHANGELOG.md.

    Changelog entries help clients to follow the progress in your code.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.3.0-dev.4.1