Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dm-docs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hammonds
dm-docs
Commits
c1d90384
Commit
c1d90384
authored
9 years ago
by
sveseli
Browse files
Options
Downloads
Patches
Plain Diff
get files as stat dictionary
parent
404803bc
No related branches found
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/python/dm/common/utility/osUtility.py
+7
-1
7 additions, 1 deletion
src/python/dm/common/utility/osUtility.py
src/python/dm/daq_web_service/service/impl/experimentSessionControllerImpl.py
+1
-0
1 addition, 0 deletions
...b_service/service/impl/experimentSessionControllerImpl.py
with
8 additions
and
1 deletion
src/python/dm/common/utility/osUtility.py
+
7
−
1
View file @
c1d90384
#!/usr/bin/env python
import
os
import
stat
class
OsUtility
:
...
...
@@ -117,7 +118,12 @@ class OsUtility:
for
f
in
files
:
fullPath
=
os
.
path
.
join
(
dirPath
,
f
)
if
os
.
path
.
isfile
(
fullPath
):
fDict
[
fullPath
]
=
os
.
stat
(
fullPath
)
statResult
=
os
.
stat
(
fullPath
)
fileInfo
=
{}
fileInfo
[
'
fileSize
'
]
=
statResult
[
stat
.
ST_SIZE
]
fileInfo
[
'
fileCreationTime
'
]
=
statResult
[
stat
.
ST_CTIME
]
fileInfo
[
'
fileModificationTime
'
]
=
statResult
[
stat
.
ST_MTIME
]
fDict
[
fullPath
]
=
fileInfo
elif
os
.
path
.
isdir
(
fullPath
):
fDict
=
cls
.
findFilesAsDict
(
fullPath
,
fDict
)
return
fDict
...
...
This diff is collapsed.
Click to expand it.
src/python/dm/daq_web_service/service/impl/experimentSessionControllerImpl.py
+
1
−
0
View file @
c1d90384
...
...
@@ -96,6 +96,7 @@ class ExperimentSessionControllerImpl(DmObjectManager):
filePathsDict
=
fileProcessingManager
.
removeHiddenFilesFromProcessing
(
filePathsDict
,
uploadInfo
)
# Check which files need to be processed
filePathsDict
=
fileProcessingManager
.
checkUploadFilesForProcessing
(
filePathsDict
,
uploadInfo
)
print
"
FILEPATHSDICT:
"
,
filePathsDict
if
not
len
(
filePathsDict
):
raise
InvalidRequest
(
'
There are no new files for upload in directory %s.
'
%
dataDirectory
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment