README.md 3,7 КБ
Newer Older
Маркевич Даниил Сергеевич's avatar
Маркевич Даниил Сергеевич включено в состав коммита
1
**EN** | [RU](README.ru.md)
4-alok's avatar
4-alok включено в состав коммита
2

Маркевич Даниил Сергеевич's avatar
Маркевич Даниил Сергеевич включено в состав коммита
3
# file_manager
4-alok's avatar
4-alok включено в состав коммита
4

Маркевич Даниил Сергеевич's avatar
Маркевич Даниил Сергеевич включено в состав коммита
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
File Manager is a Flutter widget that provides file system browsing and management functionality for Aurora OS, Android, and Linux devices. The plugin offers a customizable UI for navigating directories, viewing files, and performing file operations with sorting capabilities.

**Usage example:**
```dart
final FileManagerController controller = FileManagerController();

FileManager(
  controller: controller,
  builder: (context, snapshot) {
    return ListView.builder(
      itemCount: snapshot.files.length,
      itemBuilder: (context, index) {
        final file = snapshot.files[index];
        return ListTile(
          leading: Icon(file.isDirectory ? Icons.folder : Icons.insert_drive_file),
          title: Text(file.name),
          subtitle: Text(file.sizeFormatted),
          onTap: () {
            if (file.isDirectory) {
              controller.openDirectory(file);
            }
          },
        );
      },
    );
  },
)
```
Divyanshu Shekhar's avatar
Divyanshu Shekhar включено в состав коммита
33

4-alok's avatar
4-alok включено в состав коммита
34

Маркевич Даниил Сергеевич's avatar
Маркевич Даниил Сергеевич включено в состав коммита
35
36
37
38
39
## Contents
- [Installation and build](#installation-and-assembly)
- [Detailed description](#detailed-description)
- [Compatibility](#compatibility)
- [Terms of use and participation in development](#terms-of-use-and-participation)
4-alok's avatar
4-alok включено в состав коммита
40

Маркевич Даниил Сергеевич's avatar
Маркевич Даниил Сергеевич включено в состав коммита
41
42
43
44
45

<a name="installation-and-assembly"></a>
## Installation and build

Add the plugin depending on the target application in the `pubspec.yaml` file:
4-alok's avatar
4-alok включено в состав коммита
46
47
48

```yaml
dependencies:
Vladimir Vershinin's avatar
Vladimir Vershinin включено в состав коммита
49
50
  file_manager:
    git:
Маркевич Даниил Сергеевич's avatar
Маркевич Даниил Сергеевич включено в состав коммита
51
      url: https://developer.auroraos.ru/git/flutter/flutter-community-plugins/file_manager.git
4-alok's avatar
4-alok включено в состав коммита
52
53
```

Маркевич Даниил Сергеевич's avatar
Маркевич Даниил Сергеевич включено в состав коммита
54
55
56
And update the dependencies:
```bash
flutter pub get
4-alok's avatar
4-alok включено в состав коммита
57
58
```

Маркевич Даниил Сергеевич's avatar
Маркевич Даниил Сергеевич включено в состав коммита
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<a name="detailed-description"></a>
## Detailed description

The File Manager plugin provides a comprehensive set of features for file system navigation and management:

### Key Features:
- **File System Navigation**: Browse directories and traverse the file system hierarchy
- **Customizable UI**: Builder pattern allows complete control over the file list appearance
- **File Sorting**: Sort files and folders by name, date, type, or size
- **Storage Access**: Access to different storage locations on the device
- **Platform Support**: Works on Aurora OS, Android, and Linux platforms
- **File Information**: Display file sizes, types, and modification dates
- **Hidden Files**: Option to show or hide hidden files and directories

### Main Components:
- **FileManager Widget**: Main UI component for displaying file contents
- **FileManagerController**: Handles navigation state and file operations
- **SortBy Enum**: Defines sorting options (name, date, type, size)
- **FileSystem Extensions**: Utility methods for file operations

### Integration:
The plugin seamlessly integrates with Flutter applications and follows Material Design guidelines. It provides callbacks for file selection, navigation events, and error handling.

<a name="compatibility"></a>
## Compatibility
The plugin has been working correctly since the 5.0.0 version of the Aurora OS.

### Requirements
- **Flutter**: 3.32.7 or higher
- **Aurora OS**: 5.0.0 or higher


<a name="terms-of-use-and-participation"></a>
## Terms of Use and Participation

The source code of the project is provided under
[the license](LICENSE.BSD-3-Clause.md),
that allows it to be used in third-party applications.

To participate in the development of the project, please read the [contributor agreement](CONTRIBUTING.md).
If you plan to contribute your own source code to the project, you will need to accept the [CLA agreement](https://developer.auroraos.ru/git/wiki/-/wikis/CLA.ru).

For information about contributors see [AUTHORS](AUTHORS.md).

[Code of conduct](CODE_OF_CONDUCT.md) is a current set of rules
of the Open Mobile Platform which informs you how we expect
the members of the community will interact while contributing and communicating.