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
7f591246
Kaydet (Commit)
7f591246
authored
Haz 18, 2002
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clarified documentation for os.access().
Patch contributed by Sean Reifschneider. Closes SF patch #570618.
üst
ae39ddd6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
libos.tex
Doc/lib/libos.tex
+7
-5
posixmodule.c
Modules/posixmodule.c
+5
-1
No files found.
Doc/lib/libos.tex
Dosyayı görüntüle @
7f591246
...
...
@@ -568,11 +568,13 @@ Availability: Windows.
\subsection
{
Files and Directories
\label
{
os-file-dir
}}
\begin{funcdesc}
{
access
}{
path, mode
}
Check read/write/execute permissions for this process or existence of
file
\var
{
path
}
.
\var
{
mode
}
should be
\constant
{
F
_
OK
}
to test the
existence of
\var
{
path
}
, or it can be the inclusive OR of one or more
of
\constant
{
R
_
OK
}
,
\constant
{
W
_
OK
}
, and
\constant
{
X
_
OK
}
to test
permissions. Return
\code
{
1
}
if access is allowed,
\code
{
0
}
if not.
Use the real uid/gid to test for access to
\var
{
path
}
. Note that most
operations will use the effective uid/gid, therefore this routine can
be used in a suid/sgid environment to test if the invoking user has the
specified access to
\var
{
path
}
.
\var
{
mode
}
should be
\constant
{
F
_
OK
}
to test the existence of
\var
{
path
}
, or it can be the inclusive OR of
one or more of
\constant
{
R
_
OK
}
,
\constant
{
W
_
OK
}
, and
\constant
{
X
_
OK
}
to
test permissions. Return
\code
{
1
}
if access is allowed,
\code
{
0
}
if not.
See the
\UNIX
{}
man page
\manpage
{
access
}{
2
}
for more information.
Availability:
\UNIX
, Windows.
\end{funcdesc}
...
...
Modules/posixmodule.c
Dosyayı görüntüle @
7f591246
...
...
@@ -736,7 +736,11 @@ posix_do_stat(PyObject *self, PyObject *args, char *format,
PyDoc_STRVAR
(
posix_access__doc__
,
"access(path, mode) -> 1 if granted, 0 otherwise
\n
\
Test for access to a file."
);
Use the real uid/gid to test for access to a path. Note that most
operations will use the effective uid/gid, therefore this routine can
be used in a suid/sgid environment to test if the invoking user has the
specified access to the path. The mode argument can be F_OK to test
existance, or the inclusive-OR of R_OK, W_OK, and X_OK."
);
static
PyObject
*
posix_access
(
PyObject
*
self
,
PyObject
*
args
)
...
...
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