Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
Make default mkdir access mode the same as the xrootd client
Browse files Browse the repository at this point in the history
  • Loading branch information
jlsalmon committed Nov 22, 2013
1 parent aa57e92 commit 9a8ee7f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libs/client/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from XRootD.client.responses import XRootDStatus, StatInfo, StatInfoVFS
from XRootD.client.responses import LocationInfo, DirectoryList, ProtocolInfo
from XRootD.client.utils import CallbackWrapper
from XRootD.client.flags import AccessMode

class FileSystem(object):
"""Interact with an ``xrootd`` server to perform filesystem-based operations
Expand Down Expand Up @@ -174,10 +175,14 @@ def mkdir(self, path, flags=0, mode=0, timeout=0, callback=None):
where the default is `MkDirFlags.NONE`
:param mode: the initial file access mode, an `ORed` combination of
:mod:`XRootD.client.flags.AccessMode` where the default is
`AccessMode.NONE`
`rwxr-x---`
:returns: tuple containing :mod:`XRootD.client.responses.XRootDStatus`
object and None
"""
if mode == 0:
mode = AccessMode.UR | AccessMode.UW | AccessMode.UX | \
AccessMode.GR | AccessMode.GX

if callback:
callback = CallbackWrapper(callback, None)
return XRootDStatus(self.__fs.mkdir(path, flags, mode, timeout, callback))
Expand Down

0 comments on commit 9a8ee7f

Please sign in to comment.