Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
leaanthony committed Apr 26, 2020
2 parents 79188c5 + 6fc419a commit a8ecc1e
Show file tree
Hide file tree
Showing 33 changed files with 2,120 additions and 1,669 deletions.
5 changes: 4 additions & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ Wails is what it is because of the time and effort given by these great people.
* [Kris Raney](https://github.com/kraney)
* [Jack Mordaunt](https://github.com/JackMordaunt)
* [Michael Hipp](https://github.com/MichaelHipp)
* [Travis McLane](https://github.com/tmclane)
* [Travis McLane](https://github.com/tmclane)
* [Reuben Thomas-Davis](https://github.com/Rested)
* [Jarek](https://github.com/Jarek-SRT)
* [Konez2k](https://github.com/konez2k)
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,11 @@ This project was mainly coded to the following albums:
## Licensing

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)

## Special Thank You

<p align="center" style="text-align: center">
A special thank you to JetBrains for donating licenses to us!<br/><br/>
Please click the logo to let them know your appreciation!<br/><br/>
<a href="https://www.jetbrains.com?from=Wails"><img src="jetbrains-grayscale.png" width="30%"></a>
</p>
2 changes: 1 addition & 1 deletion app_other.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build +linux +darwin !windows
// +build linux darwin !windows

package wails

Expand Down
5 changes: 2 additions & 3 deletions cmd/cmd-mewn.go

Large diffs are not rendered by default.

21 changes: 19 additions & 2 deletions cmd/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"path"
"path/filepath"
"runtime"
"strings"

"github.com/leaanthony/slicer"
)
Expand Down Expand Up @@ -47,6 +48,22 @@ func (fs *FSHelper) FileExists(path string) bool {
return fi.Mode().IsRegular()
}

// FindFile returns the first occurrence of match inside path.
func (fs *FSHelper) FindFile(path, match string) (string, error) {
files, err := ioutil.ReadDir(path)
if err != nil {
return "", err
}

for _, f := range files {
if !f.IsDir() && strings.Contains(f.Name(), match) {
return f.Name(), nil
}
}

return "", fmt.Errorf("file not found")
}

// CreateFile creates a file at the given filename location with the contents
// set to the given data. It will create intermediary directories if needed.
func (fs *FSHelper) CreateFile(filename string, data []byte) error {
Expand Down Expand Up @@ -100,10 +117,10 @@ func (fs *FSHelper) RemoveFile(filename string) error {
}

// RemoveFiles removes the given filenames
func (fs *FSHelper) RemoveFiles(files []string) error {
func (fs *FSHelper) RemoveFiles(files []string, continueOnError bool) error {
for _, filename := range files {
err := os.Remove(filename)
if err != nil {
if err != nil && !continueOnError {
return err
}
}
Expand Down
Loading

0 comments on commit a8ecc1e

Please sign in to comment.