ID EN
Pathlib

as_uri

Python 3.11 🇮🇩 Bahasa Indonesia

Mewakili jalur sebagai URI 'file'. ValueError dimunculkan jika jalurnya tidak absolut.

Syntax

PYTHON
PurePath.as_uri()

Contoh

Example 1
PYTHON
>>> p = PurePosixPath('/etc/passwd')
>>> p.as_uri()
'file:///etc/passwd'
>>> p = PureWindowsPath('c:/Windows')
>>> p.as_uri()
'file:///c:/Windows'

See Also

ValueError