File: filesystem.rst

package info (click to toggle)
xrootd 5.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 20,792 kB
  • sloc: cpp: 233,758; sh: 2,433; python: 1,966; ansic: 1,008; perl: 814; makefile: 218
file content (118 lines) | stat: -rw-r--r-- 3,243 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
=======================
``FileSystem`` examples
=======================

This page includes some simple examples of basic usage of the ``pyxrootd``
`FileSystem` object to interact with an ``xrootd`` server.

We'll use the following imports and `FileSystem` object as the basis for the
rest of the examples::

  from XRootD import client
  from XRootD.client.flags import DirListFlags, OpenFlags, MkDirFlags, QueryCode

  myclient = client.FileSystem('root://someserver:1094')

.. -----------------------------------------------------------------------------
.. copy
.. -----------------------------------------------------------------------------

.. include:: ../../../examples/copy.py
   :start-line: 1
   :end-line: 3

.. literalinclude:: ../../../examples/copy.py
   :lines: 11-

.. include:: ../../../examples/copy.py
   :start-line: 4
   :end-line: 6

.. -----------------------------------------------------------------------------
.. dirlist
.. -----------------------------------------------------------------------------

.. include:: ../../../examples/dirlist.py
   :start-line: 1
   :end-line: 3

.. literalinclude:: ../../../examples/dirlist.py
   :lines: 16-

.. include:: ../../../examples/dirlist.py
   :start-line: 4
   :end-line: 9

.. -----------------------------------------------------------------------------
.. mkdir
.. -----------------------------------------------------------------------------

.. include:: ../../../examples/mkdir.py
   :start-line: 1
   :end-line: 3

.. literalinclude:: ../../../examples/mkdir.py
   :lines: 9-

.. -----------------------------------------------------------------------------
.. rmdir
.. -----------------------------------------------------------------------------

.. include:: ../../../examples/rmdir.py
   :start-line: 1
   :end-line: 3

.. literalinclude:: ../../../examples/rmdir.py
   :lines: 8-

.. -----------------------------------------------------------------------------
.. mv
.. -----------------------------------------------------------------------------

.. include:: ../../../examples/mv.py
   :start-line: 1
   :end-line: 3

.. literalinclude:: ../../../examples/mv.py
   :lines: 8-

.. -----------------------------------------------------------------------------
.. rm
.. -----------------------------------------------------------------------------

.. include:: ../../../examples/rm.py
   :start-line: 1
   :end-line: 3

.. literalinclude:: ../../../examples/rm.py
   :lines: 8-

.. -----------------------------------------------------------------------------
.. locate
.. -----------------------------------------------------------------------------

.. include:: ../../../examples/locate.py
   :start-line: 1
   :end-line: 3

.. literalinclude:: ../../../examples/locate.py
   :lines: 13-

.. include:: ../../../examples/locate.py
   :start-line: 4
   :end-line: 7

.. -----------------------------------------------------------------------------
.. query
.. -----------------------------------------------------------------------------
.. include:: ../../../examples/query.py
   :start-line: 1
   :end-line: 3

.. literalinclude:: ../../../examples/query.py
   :lines: 17-

.. include:: ../../../examples/query.py
   :start-line: 4
   :end-line: 11