الفرق بين المراجعتين ل"Python/pathlib/Path/is mount"

من موسوعة حسوب
< Python‏ | pathlib‏ | Path
اذهب إلى التنقل اذهب إلى البحث
(أنشأ الصفحة ب'== التابع Path.cwd == يعيد كائن مسار جديدًا يمثّل المسار الحالي (بشكل مشابه للتابع os.getcwd)<syntaxhighlight lan...')
 
سطر 1: سطر 1:
== التابع Path.cwd ==
+
== التابع Path.is_mount==
يعيد كائن مسار جديدًا يمثّل المسار الحالي (بشكل مشابه للتابع os.getcwd)<syntaxhighlight lang="python3">
+
يعيد هذا التابع القيمة المنطقية <code>True</code> إذا كان المسار هو نقطة تثبيت [https://unix.stackexchange.com/questions/3247/understanding-mount-as-a-concept-in-the-os (mount point)] .
>>> Path.cwd()
 
  
PosixPath('/home/antoine/pathlib')
+
New in version 3.7.
  
 
+
Return True if the path is a mount point: a point in a file system where a different file system has been mounted. On POSIX, the function checks whether path’s parent, path/.., is on a different device than path, or whether path/.. and path point to the same i-node on the same device — this should detect mount points for all Unix and POSIX variants. Not implemented on Windows.
</syntaxhighlight><span> </span>
 

مراجعة 21:40، 29 يوليو 2018

 التابع Path.is_mount

يعيد هذا التابع القيمة المنطقية True إذا كان المسار هو نقطة تثبيت (mount point) .

New in version 3.7.

Return True if the path is a mount point: a point in a file system where a different file system has been mounted. On POSIX, the function checks whether path’s parent, path/.., is on a different device than path, or whether path/.. and path point to the same i-node on the same device — this should detect mount points for all Unix and POSIX variants. Not implemented on Windows.