-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bae064b
Showing
11 changed files
with
825 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: MacOS | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Build with Maven | ||
run: mvn install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Ubuntu | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Build with Maven | ||
run: mvn install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Windows | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Build with Maven and generate coverage report | ||
env: | ||
GITHUB_USERNAME: williamniemiec | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: mvn --file pom.xml jacoco:prepare-agent install jacoco:report | ||
- uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./**/target/site/jacoco/jacoco.xml | ||
name: codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Project | ||
.settings/ | ||
*.iml | ||
.idea/ | ||
|
||
# Maven | ||
target/ | ||
pom.xml.tag | ||
pom.xml.releaseBackup | ||
pom.xml.versionsBackup | ||
pom.xml.next | ||
release.properties | ||
dependency-reduced-pom.xml | ||
buildNumber.properties | ||
.mvn/timing.properties | ||
.mvn/wrapper/maven-wrapper.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 William Niemiec | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
![](https://github.com/wniemiec-io-java/file-searcher/blob/master/docs/img/logo/logo.jpg) | ||
|
||
<h1 align='center'>File Searcher</h1> | ||
<p align='center'>Searches for files.</p> | ||
<p align="center"> | ||
<a href="https://github.com/wniemiec-io-java/file-searcher/actions/workflows/windows.yml"><img src="https://github.com/wniemiec-io-java/file-searcher/actions/workflows/windows.yml/badge.svg" alt=""></a> | ||
<a href="https://github.com/wniemiec-io-java/file-searcher/actions/workflows/macos.yml"><img src="https://github.com/wniemiec-io-java/file-searcher/actions/workflows/macos.yml/badge.svg" alt=""></a> | ||
<a href="https://github.com/wniemiec-io-java/file-searcher/actions/workflows/ubuntu.yml"><img src="https://github.com/wniemiec-io-java/file-searcher/actions/workflows/ubuntu.yml/badge.svg" alt=""></a> | ||
<a href="https://codecov.io/gh/wniemiec-io-java/file-searcher"><img src="https://codecov.io/gh/wniemiec-io-java/file-searcher/branch/master/graph/badge.svg?token=R2SFS4SP86" alt="Coverage status"></a> | ||
<a href="http://java.oracle.com"><img src="https://img.shields.io/badge/java-11+-D0008F.svg" alt="Java compatibility"></a> | ||
<a href="https://mvnrepository.com/artifact/io.github.wniemiec-io-java/file-searcher"><img src="https://img.shields.io/maven-central/v/io.github.wniemiec-io-java/file-searcher" alt="Maven Central release"></a> | ||
<a href="https://github.com/wniemiec-io-java/file-searcher/blob/master/LICENSE"><img src="https://img.shields.io/github/license/wniemiec-io-java/file-searcher" alt="License"></a> | ||
</p> | ||
<hr /> | ||
|
||
## ❇ Introduction | ||
File Searcher searches for files simply and easily. | ||
|
||
## ❓ How to use | ||
1. Add one of the options below to the pom.xml file: | ||
|
||
#### Using Maven Central (recomended): | ||
``` | ||
<dependency> | ||
<groupId>io.github.wniemiec-io-java</groupId> | ||
<artifactId>file-searcher</artifactId> | ||
<version>LATEST</version> | ||
</dependency> | ||
``` | ||
|
||
#### Using GitHub Packages: | ||
``` | ||
<dependency> | ||
<groupId>wniemiec.io.java</groupId> | ||
<artifactId>file-searcher</artifactId> | ||
<version>LATEST</version> | ||
</dependency> | ||
``` | ||
|
||
2. Run | ||
``` | ||
$ mvn install | ||
``` | ||
|
||
3. Use it | ||
``` | ||
[...] | ||
import wniemiec.io.java.FileSearcher; | ||
[...] | ||
Path workingDirectory = Path.of(".", "src", "test", "java"); | ||
FileSearcher searcher = new FileSearcher(workingDirectory); | ||
Path file = searcher.search("FileSearcherTest.java"); | ||
System.out.println( file.toAbsolutePath() ); | ||
[...] | ||
``` | ||
|
||
|
||
## 📖 Documentation | ||
| Property |Parameter type|Return type|Description|Default parameter value| | ||
|----------------|-------------------------------|-----|------------------------|--------| | ||
|searchAllFilesWithExtension |`extension: String`|`Set<Path>`|Searches for all files with an extension starting from the specified working directory| - | | ||
|search |`filename: String`|`Path`|Searches for a file starting from the specified working directory| - | | ||
|
||
## 🚩 Changelog | ||
Details about each version are documented in the [releases section](https://github.com/williamniemiec/wniemiec-io-java/file-searcher/releases). | ||
|
||
## 🤝 Contribute! | ||
See the documentation on how you can contribute to the project [here](https://github.com/wniemiec-io-java/file-searcher/blob/master/CONTRIBUTING.md). | ||
|
||
## 📁 Files | ||
|
||
### / | ||
| Name |Type|Description| | ||
|----------------|-------------------------------|-----------------------------| | ||
|dist |`Directory`|Released versions| | ||
|docs |`Directory`|Documentation files| | ||
|src |`Directory`| Source files| |
Binary file not shown.
Oops, something went wrong.