Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
polysoft-nafmii
/
polysoft-android
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ec604a6a
authored
Jul 16, 2021
by
amateur
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
dd2891af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletions
app/src/main/java/com/polysoft/nafmii/utils/FileUtils.java
app/src/main/java/com/polysoft/nafmii/utils/FileUtils.java
View file @
ec604a6
...
@@ -4,7 +4,11 @@ import java.io.File;
...
@@ -4,7 +4,11 @@ import java.io.File;
public
class
FileUtils
{
public
class
FileUtils
{
public
static
File
getDistPath
()
{
public
static
File
getIndex
()
{
return
new
File
(
getDistDir
(),
"index.html"
);
}
public
static
File
getDistDir
()
{
File
dist
=
new
File
(
getRootDir
(),
"dist"
);
File
dist
=
new
File
(
getRootDir
(),
"dist"
);
if
(!
dist
.
exists
())
{
if
(!
dist
.
exists
())
{
dist
.
mkdirs
();
dist
.
mkdirs
();
...
@@ -12,7 +16,19 @@ public class FileUtils {
...
@@ -12,7 +16,19 @@ public class FileUtils {
return
dist
;
return
dist
;
}
}
public
static
File
getDownloadDir
()
{
File
download
=
new
File
(
getRootDir
(),
"download"
);
if
(!
download
.
exists
())
{
download
.
mkdirs
();
}
return
download
;
}
public
static
File
getRootDir
()
{
public
static
File
getRootDir
()
{
return
CtxUtils
.
getApplication
().
getFilesDir
();
return
CtxUtils
.
getApplication
().
getFilesDir
();
}
}
public
static
File
getRootCacheDir
()
{
return
CtxUtils
.
getApplication
().
getCacheDir
();
}
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment