Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangtian616 committed Aug 3, 2023
0 parents commit a35467f
Show file tree
Hide file tree
Showing 18 changed files with 589 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/

# Avoid committing pubspec.lock for library packages; see
# https://dart.dev/guides/libraries/private-files#pubspeclock.
pubspec.lock
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

388 changes: 388 additions & 0 deletions .idea/libraries/Dart_Packages.xml

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .idea/libraries/Dart_SDK.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0.0

- Initial version.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.
For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->

TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.

## Features

TODO: List what your package can do. Maybe include images, gifs, or videos.

## Getting started

TODO: List prerequisites and provide or point to information on how to
start using the package.

## Usage

TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.

```dart
const like = 'sample';
```

## Additional information

TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
30 changes: 30 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

# linter:
# rules:
# - camel_case_types

# analyzer:
# exclude:
# - path/to/excluded/files/**

# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints

# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
1 change: 1 addition & 0 deletions example/jtorrent_example.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
void main() {}
14 changes: 14 additions & 0 deletions jtorrent.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>
1 change: 1 addition & 0 deletions lib/jtorrent.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
library;
1 change: 1 addition & 0 deletions lib/src/manager/torrent_manager.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
class TorrentManager {}
12 changes: 12 additions & 0 deletions lib/src/model/torrent.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'package:jtorrent/src/model/torrent_file.dart';

/// http://bittorrent.org/beps/bep_0003.html
class Torrent {
Set<Uri>? _announces;

/// Single file : name of the file
/// Multiple files : name of the directory
String? name;

final List<TorrentFile> files;
}
8 changes: 8 additions & 0 deletions lib/src/model/torrent_file.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/// File content described in torrent file
class TorrentFile {
/// File path, the last of which is the actual file name
final String path;

/// The length of the file in bytes
final int length;
}
14 changes: 14 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: jtorrent
description: BitTorrent client written in pure Dart
version: 1.0.0
# repository: https://github.com/my_org/my_repo

environment:
sdk: ^3.0.6

# Add regular dependencies here.
dependencies:

dev_dependencies:
lints: ^2.0.0
test: ^1.21.0
12 changes: 12 additions & 0 deletions test/jtorrent_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'package:test/test.dart';

void main() {
group('A group of tests', () {
setUp(() {
// Additional setup goes here.
});

test('First Test', () {
});
});
}

0 comments on commit a35467f

Please sign in to comment.