file: and data:
pathlib_next.uri.schemes.file
FileUri(*uris, **options)
Bases: UriPath
file: scheme: a UriPath wrapping a LocalPath (filepath),
delegating all I/O to it.
Source code in src/pathlib_next/uri/__init__.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | |
is_absolute()
Also True for a Windows drive path ("C:/x"), which _init()
stores without the "/" a URI path gets in front of it. "C:" alone is
drive-relative, as for PureWindowsPath.
Source code in src/pathlib_next/uri/schemes/file.py
44 45 46 47 48 49 50 51 52 53 | |
pathlib_next.uri.schemes.data
DataUri(*uris, **options)
Bases: UriPath
data: scheme (RFC 2397): a read-only "file" whose entire content is
embedded in the URI itself (data:[<mediatype>][;base64],<data>) -- no
filesystem, no directories, no backend/connection. Percent-encoded
reserved characters (?/#) in the payload are only decoded correctly
if the URI was built with them escaped, per RFC 2397/3986.
Source code in src/pathlib_next/uri/__init__.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | |
mediatype
property
The declared media type. Without a type/subtype, RFC 2397 implies "text/plain": a bare header gives "text/plain;charset=US-ASCII", and parameters alone (";charset=utf-8") are given that type.
stat(*, follow_symlinks=True)
Source code in src/pathlib_next/uri/schemes/data.py
62 63 | |