Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
20ce7788
Commit
20ce7788
authored
Jan 24, 2017
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify files.get / files.exists
parent
124bb988
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
files.js
src/app/files.js
+2
-10
No files found.
src/app/files.js
View file @
20ce7788
...
@@ -13,11 +13,7 @@ function Files (storage) {
...
@@ -13,11 +13,7 @@ function Files (storage) {
return
false
return
false
}
}
if
(
this
.
isReadOnly
(
path
))
{
return
this
.
isReadOnly
(
path
)
||
storage
.
exists
(
path
)
return
true
}
else
{
return
storage
.
exists
(
path
)
}
}
}
this
.
get
=
function
(
path
)
{
this
.
get
=
function
(
path
)
{
...
@@ -26,11 +22,7 @@ function Files (storage) {
...
@@ -26,11 +22,7 @@ function Files (storage) {
return
null
return
null
}
}
if
(
this
.
isReadOnly
(
path
))
{
return
readonly
[
path
]
||
storage
.
get
(
path
)
return
readonly
[
path
]
}
else
{
return
storage
.
get
(
path
)
}
}
}
this
.
set
=
function
(
path
,
content
)
{
this
.
set
=
function
(
path
,
content
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment