Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pyfs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pyfs
Commits
25868cb2
Commit
25868cb2
authored
Aug 04, 2010
by
rfkelly0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dokan: basic outputting of file/directory attributes
parent
ab0c29e9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
fs/expose/dokan/__init__.py
+0
-0
fs/expose/dokan/dokan_ctypes.py
+16
-7
No files found.
fs/expose/dokan/__init__.py
View file @
25868cb2
This diff is collapsed.
Click to expand it.
fs/expose/dokan/dokan_ctypes.py
View file @
25868cb2
"""
fs.expose.dokan.dokan_ctypes: low-level ctypes interface to Dokan
"""
from
ctypes
import
*
try
:
DokanMain
=
windll
.
Dokan
.
DokanMain
DokanVersion
=
windll
.
Dokan
.
DokanVersion
except
AttributeError
:
raise
ImportError
(
"Dokan DLL not found"
)
...
...
@@ -15,6 +21,13 @@ UCHAR = c_ubyte
LPDWORD
=
POINTER
(
DWORD
)
LONGLONG
=
c_longlong
DokanVersion
.
restype
=
ULONG
DokanVersion
.
argtypes
=
()
if
DokanVersion
()
<
0
:
# TODO: find min supported version
raise
ImportError
(
"Dokan DLL is too old"
)
MAX_PATH
=
260
class
FILETIME
(
Structure
):
...
...
@@ -197,7 +210,9 @@ class DokanOperations(object):
try
:
setattr
(
self
.
buffer
,
nm
,
typ
(
getattr
(
self
,
nm
)))
except
AttributeError
:
setattr
(
self
.
buffer
,
nm
,
typ
(
self
.
_noop
))
#setattr(self.buffer,nm,typ(self._noop))
# This bizarre syntax creates a NULL function pointer.
setattr
(
self
.
buffer
,
nm
,
typ
())
def
_noop
(
self
,
*
args
):
return
-
1
...
...
@@ -226,12 +241,6 @@ DokanUnmount.argtypes = (
BOOL
,
# ignore case
)
DokanVersion
=
windll
.
Dokan
.
DokanVersion
DokanVersion
.
restype
=
ULONG
DokanVersion
.
argtypes
=
(
)
DokanDriverVersion
=
windll
.
Dokan
.
DokanDriverVersion
DokanDriverVersion
.
restype
=
ULONG
DokanDriverVersion
.
argtypes
=
(
...
...
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