Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
b9831ab6
Kaydet (Commit)
b9831ab6
authored
Haz 24, 2012
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Move Linux-only *xattr() functions to their own subheading.
üst
7ac2af78
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
84 deletions
+75
-84
os.rst
Doc/library/os.rst
+75
-84
No files found.
Doc/library/os.rst
Dosyayı görüntüle @
b9831ab6
...
...
@@ -1422,20 +1422,6 @@ features:
and the *dir_fd* and *follow_symlinks* arguments.
.. function:: getxattr(path, attribute, *, follow_symlinks=True)
Return the value of the extended filesystem attribute *attribute* for
*path*. *attribute* can be bytes or str. If it is str, it is encoded
with the filesystem encoding.
This function can support :ref:`specifying a file descriptor <path_fd>` and
:ref:`not following symlinks <follow_symlinks>`.
Availability: Linux.
.. versionadded:: 3.3
.. function:: lchflags(path, flags)
Set the flags of *path* to the numeric *flags*, like :func:`chflags`, but do
...
...
@@ -1511,21 +1497,6 @@ features:
Added support for specifying an open file descriptor for *path*.
.. function:: listxattr(path=None, *, follow_symlinks=True)
Return a list of the extended filesystem attributes on *path*. The
attributes in the list are represented as strings decoded with the filesystem
encoding. If *path* is ``None``, :func:`listxattr` will examine the current
directory.
This function can support :ref:`specifying a file descriptor <path_fd>` and
:ref:`not following symlinks <follow_symlinks>`.
Availability: Linux.
.. versionadded:: 3.3
.. function:: lstat(path, *, dir_fd=None)
Perform the equivalent of an :c:func:`lstat` system call on the given path.
...
...
@@ -1726,20 +1697,6 @@ features:
successfully removed.
.. function:: removexattr(path, attribute, *, follow_symlinks=True)
Removes the extended filesystem attribute *attribute* from *path*.
*attribute* should be bytes or str. If it is a string, it is encoded
with the filesystem encoding.
This function can support :ref:`specifying a file descriptor <path_fd>` and
:ref:`not following symlinks <follow_symlinks>`.
Availability: Linux.
.. versionadded:: 3.3
.. function:: rename(src, dst, *, src_dir_fd=None, dst_dir_fd=None)
Rename the file or directory *src* to *dst*. If *dst* is a directory,
...
...
@@ -1817,47 +1774,6 @@ features:
The *dir_fd* parameter.
.. data:: XATTR_SIZE_MAX
The maximum size the value of an extended attribute can be. Currently, this
is 64 kilobytes on Linux.
.. data:: XATTR_CREATE
This is a possible value for the flags argument in :func:`setxattr`. It
indicates the operation must create an attribute.
.. data:: XATTR_REPLACE
This is a possible value for the flags argument in :func:`setxattr`. It
indicates the operation must replace an existing attribute.
.. function:: setxattr(path, attribute, value, flags=0, *, follow_symlinks=True)
Set the extended filesystem attribute *attribute* on *path* to *value*.
*attribute* must be a bytes or str with no embedded NULs. If it is a str,
it is encoded with the filesystem encoding. *flags* may be
:data:`XATTR_REPLACE` or :data:`XATTR_CREATE`. If :data:`XATTR_REPLACE` is
given and the attribute does not exist, ``EEXISTS`` will be raised.
If :data:`XATTR_CREATE` is given and the attribute already exists, the
attribute will not be created and ``ENODATA`` will be raised.
This function can support :ref:`specifying a file descriptor <path_fd>` and
:ref:`not following symlinks <follow_symlinks>`.
Availability: Linux.
.. note::
A bug in Linux kernel versions less than 2.6.39 caused the flags argument
to be ignored on some filesystems.
.. versionadded:: 3.3
.. function:: stat(path, *, dir_fd=None, follow_symlinks=True)
Perform the equivalent of a :c:func:`stat` system call on the given path.
...
...
@@ -2334,6 +2250,81 @@ features:
.. versionadded:: 3.3
Linux extended attributes
~~~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 3.3
These functions are all available on Linux only.
.. function:: getxattr(path, attribute, *, follow_symlinks=True)
Return the value of the extended filesystem attribute *attribute* for
*path*. *attribute* can be bytes or str. If it is str, it is encoded
with the filesystem encoding.
This function can support :ref:`specifying a file descriptor <path_fd>` and
:ref:`not following symlinks <follow_symlinks>`.
.. function:: listxattr(path=None, *, follow_symlinks=True)
Return a list of the extended filesystem attributes on *path*. The
attributes in the list are represented as strings decoded with the filesystem
encoding. If *path* is ``None``, :func:`listxattr` will examine the current
directory.
This function can support :ref:`specifying a file descriptor <path_fd>` and
:ref:`not following symlinks <follow_symlinks>`.
.. function:: removexattr(path, attribute, *, follow_symlinks=True)
Removes the extended filesystem attribute *attribute* from *path*.
*attribute* should be bytes or str. If it is a string, it is encoded
with the filesystem encoding.
This function can support :ref:`specifying a file descriptor <path_fd>` and
:ref:`not following symlinks <follow_symlinks>`.
.. function:: setxattr(path, attribute, value, flags=0, *, follow_symlinks=True)
Set the extended filesystem attribute *attribute* on *path* to *value*.
*attribute* must be a bytes or str with no embedded NULs. If it is a str,
it is encoded with the filesystem encoding. *flags* may be
:data:`XATTR_REPLACE` or :data:`XATTR_CREATE`. If :data:`XATTR_REPLACE` is
given and the attribute does not exist, ``EEXISTS`` will be raised.
If :data:`XATTR_CREATE` is given and the attribute already exists, the
attribute will not be created and ``ENODATA`` will be raised.
This function can support :ref:`specifying a file descriptor <path_fd>` and
:ref:`not following symlinks <follow_symlinks>`.
.. note::
A bug in Linux kernel versions less than 2.6.39 caused the flags argument
to be ignored on some filesystems.
.. data:: XATTR_SIZE_MAX
The maximum size the value of an extended attribute can be. Currently, this
is 64 kilobytes on Linux.
.. data:: XATTR_CREATE
This is a possible value for the flags argument in :func:`setxattr`. It
indicates the operation must create an attribute.
.. data:: XATTR_REPLACE
This is a possible value for the flags argument in :func:`setxattr`. It
indicates the operation must replace an existing attribute.
.. _os-process:
Process Management
...
...
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