Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
storagedriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
4
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d9210dd5
authored
Feb 24, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
driver: added list_files function
parent
623d1db1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletions
+13
-1
storagedriver.py
+13
-1
No files found.
storagedriver.py
View file @
d9210dd5
from
disk
import
Disk
from
storagecelery
import
celery
from
os
import
path
,
unlink
,
statvfs
from
os
import
path
,
unlink
,
statvfs
,
listdir
,
mkdir
from
shutil
import
move
from
celery.contrib.abortable
import
AbortableTask
import
logging
logger
=
logging
.
getLogger
(
__name__
)
trash_directory
=
"trash"
@celery.task
()
...
...
@@ -10,6 +16,12 @@ def list(dir):
@celery.task
()
def
list_files
(
datastore
):
return
[
l
for
l
in
listdir
(
datastore
)
if
path
.
isfile
(
path
.
join
(
datastore
,
l
))]
@celery.task
()
def
create
(
disk_desc
):
disk
=
Disk
.
deserialize
(
disk_desc
)
disk
.
create
()
...
...
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