diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-10-09 13:08:17 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-10-09 13:08:17 -0700 |
commit | 7856d01c728a866d064788a9e386822fc38a773f (patch) | |
tree | 2daa1a2966ce7cd9c87ea0671dfcf7248dce9b8f /src/github/daneren2005 | |
parent | 95055d8b0b07d74cda72d2773c805ccef59a3a7a (diff) | |
download | dsub-7856d01c728a866d064788a9e386822fc38a773f.tar.gz dsub-7856d01c728a866d064788a9e386822fc38a773f.tar.bz2 dsub-7856d01c728a866d064788a9e386822fc38a773f.zip |
Add abstract method to get file from any entry
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r-- | src/github/daneren2005/dsub/util/FileUtil.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/util/FileUtil.java b/src/github/daneren2005/dsub/util/FileUtil.java index ed8468b9..54888b59 100644 --- a/src/github/daneren2005/dsub/util/FileUtil.java +++ b/src/github/daneren2005/dsub/util/FileUtil.java @@ -105,6 +105,14 @@ public class FileUtil { return null; } + + public static File getEntryFile(Context context, MusicDirectory.Entry entry) { + if(entry.isDirectory()) { + return getAlbumDirectory(context, entry); + } else { + return getSongFile(context, entry); + } + } public static File getSongFile(Context context, MusicDirectory.Entry song) { File dir = getAlbumDirectory(context, song); |