Found 513803 results in 49602 files, showing top 50 files (show more).
android.googlesource.com/platform/external/python/parse_type:tasks/_vendor/pathlib.py: [ master, ]
928: class Path(PurePath):
210:     def _split_extended_path(self, s, ext_prefix=ext_namespace_prefix):
134:     pathmod = ntpath
253:     pathmod = posixpath
565: class PurePath(object):
844:     def joinpath(self, *args):
915: class PurePosixPath(PurePath):
920: class PureWindowsPath(PurePath):
952:     def _make_child_relpath(self, part):
1275: class PosixPath(Path, PurePosixPath):
1278: class WindowsPath(Path, PureWindowsPath):
537: class _PathParents(Sequence):
40:         _getfinalpathname = None
45:     "Path", "PosixPath", "WindowsPath",
67:     """A flavour implements a particular (platform-specific) set of path
119:                 # Same drive => second path is relative to the first
122:             # Second path is non-anchored (common case)
162:             prefix, part = self._split_extended_path(part)
169:             # is a UNC path:
176:                 # a UNC path can't have two slashes in a row
201:     def resolve(self, path):
202:         s = str(path)
221:         # Turn back an extended path into a normal DOS-like path
222:         return self._split_extended_path(s)[1]
236:     def make_uri(self, path):
238:         drive = path.drive
240:             # It's a path on a local drive => 'file:///c:/a/b'
241:             rest = path.as_posix()[2:].lstrip('/')
245:             # It's a path on a network drive => 'file://host/share/a/b'
246:             return 'file:' + urlquote_from_bytes(path.as_posix().encode('utf-8'))
260:             # According to POSIX path resolution:
278:     def resolve(self, path):
280:         accessor = path._accessor
282:         def _resolve(path, rest):
284:                 path = ''
292:                     path, _, _ = path.rpartition(sep)
294:                 newpath = path + sep + name
296:                     # Already seen this path
297:                     path = seen[newpath]
298:                     if path is not None:
310:                     path = newpath
313:                     path = _resolve(path, target)
314:                     seen[newpath] = path # resolved symlink
316:             return path
317:         # NOTE: according to POSIX, getcwd() cannot contain path components
319:         base = '' if path.is_absolute() else os.getcwd()
320:         return _resolve(base, str(path)) or sep
325:     def make_uri(self, path):
326:         # We represent the path using the local filesystem encoding,
328:         bpath = bytes(path)
397:     def readlink(self, path):
398:         return os.readlink(path)
433:         raise ValueError("Invalid pattern: '**' can only be an entire path component")
446:     of a given path."""
455:     def select_from(self, parent_path):
456:         """Iterate over all child paths of `parent_path` matched by this
457:         selector.  This can contain parent_path itself."""
458:         path_cls = type(parent_path)
459:         is_dir = path_cls.is_dir
460:         exists = path_cls.exists
461:         listdir = parent_path._accessor.listdir
462:         return self._select_from(parent_path, is_dir, exists, listdir)
467:     def _select_from(self, parent_path, is_dir, exists, listdir):
468:         yield parent_path
477:     def _select_from(self, parent_path, is_dir, exists, listdir):
478:         if not is_dir(parent_path):
480:         path = parent_path._make_child_relpath(self.name)
481:         if exists(path):
482:             for p in self.successor._select_from(path, is_dir, exists, listdir):
492:     def _select_from(self, parent_path, is_dir, exists, listdir):
493:         if not is_dir(parent_path):
495:         cf = parent_path._flavour.casefold
496:         for name in listdir(parent_path):
499:                 path = parent_path._make_child_relpath(name)
500:                 for p in self.successor._select_from(path, is_dir, exists, listdir):
509:     def _iterate_directories(self, parent_path, is_dir, listdir):
510:         yield parent_path
511:         for name in listdir(parent_path):
512:             path = parent_path._make_child_relpath(name)
513:             if is_dir(path):
514:                 for p in self._iterate_directories(path, is_dir, listdir):
517:     def _select_from(self, parent_path, is_dir, exists, listdir):
518:         if not is_dir(parent_path):
524:                 for starting_point in self._iterate_directories(parent_path, is_dir, listdir):
539:     of a path.  Don't try to construct it yourself."""
542:     def __init__(self, path):
544:         self._pathcls = type(path)
545:         self._drv = path._drv
546:         self._root = path._root
547:         self._parts = path._parts
566:     """PurePath represents a filesystem path and offers operations which
579:         PurePath objects.  The strings and path objects are combined so as
580:         to yield a canonicalized path, which is incorporated into the
588:         # Using the parts tuple helps share interned path parts
604:                     "argument should be a path or str object, not %r"
639:         # Overriden in concrete Path
649:         """Return the string representation of the path, suitable for
659:         """Return the string representation of the path with forward (/)
665:         """Return the bytes representation of the path.  This is only
675:         """Return the path as a 'file' URI."""
677:             raise ValueError("relative path can't be expressed as a file URI")
725:                      doc="""The drive prefix (letter or UNC path), if any.""")
728:                     doc="""The root of the path, if any.""")
738:         """The final path component, if any."""
765:         """The final path component, minus its last suffix."""
774:         """Return a new path with the file name changed."""
781:         """Return a new path with the file suffix changed (or added, if none)."""
801:         """Return the relative path to another path identified by the passed
803:         a subpath of the other path), raise ValueError.
807:         #   Path('c:/').relative_to('c:')  gives Path('/')
808:         #   Path('c:/').relative_to('/')   raise ValueError
835:         components in the filesystem path."""
845:         """Combine this path with one or several arguments, and return a
846:         new path representing either a subpath (if all arguments are relative
847:         paths) or a totally different path (if one of the arguments is
864:         """The logical parent of the path."""
874:         """A sequence of this path's logical parents."""
878:         """True if the path is absolute (has both a root and, if applicable,
885:         """Return True if the path contains one of the special names reserved
889:     def match(self, path_pattern):
891:         Return True if this path matches the given pattern.
894:         path_pattern = cf(path_pattern)
895:         drv, root, pat_parts = self._flavour.parse_parts((path_pattern,))
934:         if cls is Path:
954:         # a single part relative to this path.
964:         Open the file pointed by this path and return a file descriptor,
973:         """Return a new path pointing to the current working directory
984:                 # Yielding a path object for these makes little sense
1013:         """Return an absolute version of this path.  This function works
1014:         even if the path doesn't point to anything.
1017:         Use resolve() to get the canonical path to a file.
1030:         Make the path absolute, resolving all symlinks on the way and also
1037:             # the path doesn't exist or is forbidden
1040:         # Now we have no symlinks in the path, it's safe to normalize it.
1048:         Return the result of the stat() system call on this path, like
1070:         Open the file pointed by this path and return a file object, as
1115:         Change the permissions of the path, like os.chmod().
1121:         Like chmod(), except if the path points to a symlink, the symlink's
1129:         If the path is a directory, use rmdir() instead.
1141:         Like stat(), except if the path points to a symlink, the symlink's
1148:         Rename this path to the given path.
1154:         Rename this path to the given path, clobbering the existing
1164:         Make this path a symlink pointing to the given path.
1173:         Whether this path exists.
1185:         Whether this path is a directory.
1192:             # Path doesn't exist or is a broken symlink
1198:         Whether this path is a regular file (also True for symlinks pointing
1206:             # Path doesn't exist or is a broken symlink
1212:         Whether this path is a symbolic link.
1219:             # Path doesn't exist
1224:         Whether this path is a block device.
1231:             # Path doesn't exist or is a broken symlink
1237:         Whether this path is a character device.
1244:             # Path doesn't exist or is a broken symlink
1250:         Whether this path is a FIFO.
1257:             # Path doesn't exist or is a broken symlink
1263:         Whether this path is a socket.
1270:             # Path doesn't exist or is a broken symlink
4: import ntpath
6: import posixpath
44:     "PurePath", "PurePosixPath", "PureWindowsPath",
111:         Join the two paths represented by the respective
128:     # Reference for Windows paths can be found at
150:     # Interesting findings about extended paths:
153:     # - extended paths are always absolute; "relative" extended paths will
160:             # XXX extended paths should also disable the collapsing of "."
227:         # We err on the side of caution and return True for paths which are
232:             # UNC paths are never reserved
262:             # "A pathname that begins with two successive slashes may be
295:                 if newpath in seen:
302:                     raise RuntimeError("Symlink loop from %r" % newpath)
305:                     target = accessor.readlink(newpath)
312:                     seen[newpath] = None # not resolved symlink
329:         return 'file://' + urlquote_from_bytes(bpath)
338:     accessing paths on the filesystem."""
345:         def wrapped(pathobj, *args):
346:             return strfunc(str(pathobj), *args)
351:         def wrapped(pathobjA, pathobjB, *args):
352:             return strfunc(str(pathobjA), str(pathobjB), *args)
368:         def lchmod(self, pathobj, mode):
540:     __slots__ = ('_pathcls', '_drv', '_root', '_parts')
558:         return self._pathcls._from_parsed_parts(self._drv, self._root,
562:         return "<{0}.parents>".format(self._pathcls.__name__)
568:     instantiating a PurePath will return either a PurePosixPath or a
569:     PureWindowsPath object.  You can also instantiate either of these classes
578:         """Construct a PurePath from one or several strings and or existing
581:         new PurePath object.
583:         if cls is PurePath:
584:             cls = PureWindowsPath if os.name == 'nt' else PurePosixPath
589:         # when pickling related paths.
598:             if isinstance(a, PurePath):
690:         if not isinstance(other, PurePath):
705:         if not isinstance(other, PurePath) or self._flavour is not other._flavour:
710:         if not isinstance(other, PurePath) or self._flavour is not other._flavour:
715:         if not isinstance(other, PurePath) or self._flavour is not other._flavour:
720:         if not isinstance(other, PurePath) or self._flavour is not other._flavour:
875:         return _PathParents(self)
935:             cls = WindowsPath if os.name == 'nt' else PosixPath
980:         result for the special paths '.' and '..'.
986:             yield self._make_child_relpath(name)
1041:         normed = self._flavour.pathmod.normpath(s)
1193:             # (see https://bitbucket.org/pitrou/pathlib/issue/12/)
1207:             # (see https://bitbucket.org/pitrou/pathlib/issue/12/)
1232:             # (see https://bitbucket.org/pitrou/pathlib/issue/12/)
1245:             # (see https://bitbucket.org/pitrou/pathlib/issue/12/)
1258:             # (see https://bitbucket.org/pitrou/pathlib/issue/12/)
1271:             # (see https://bitbucket.org/pitrou/pathlib/issue/12/)
37:         from nt import _getfinalpathname
205:         if _getfinalpathname is not None:
206:             return self._ext_to_normal(_getfinalpathname(s))
1023:         # use nt._getfullpathname())
github.com/apache/incubator-teaclave-sgx-sdk:sgx_tstd/src/path.rs: [ master, ]
557:     path: &'a [u8],
1687: impl ToOwned for Path {
1774: pub struct Path {
1787: impl Path {
2678: impl AsRef<OsStr> for Path {
2685: impl fmt::Debug for Path {
2712:     path: &'a Path,
2727: impl cmp::PartialEq for Path {
2734: impl Hash for Path {
2742: impl cmp::Eq for Path {}
2744: impl cmp::PartialOrd for Path {
2751: impl cmp::Ord for Path {
2758: impl AsRef<Path> for Path {
2816: impl<'a> IntoIterator for &'a Path {
650:     pub fn as_path(&self) -> &'a Path {
792:     pub fn as_path(&self) -> &'a Path {
1143:     pub fn as_path(&self) -> &Path {
1392:     pub fn into_boxed_path(self) -> Box<Path> {
1081: pub struct PathBuf {
1085: impl PathBuf {
1448: impl Clone for PathBuf {
1484: impl From<Box<Path>> for PathBuf {
1512: impl<T: ?Sized + AsRef<OsStr>> From<&T> for PathBuf {
1522: impl From<OsString> for PathBuf {
1542: impl From<String> for PathBuf {
1552: impl FromStr for PathBuf {
1561: impl<P: AsRef<Path>> iter::FromIterator<P> for PathBuf {
1569: impl<P: AsRef<Path>> iter::Extend<P> for PathBuf {
1580: impl fmt::Debug for PathBuf {
1586: impl ops::Deref for PathBuf {
1594: impl Borrow<Path> for PathBuf {
1601: impl Default for PathBuf {
1641: impl<'a> From<Cow<'a, Path>> for PathBuf {
1699: impl cmp::PartialEq for PathBuf {
1706: impl Hash for PathBuf {
1712: impl cmp::Eq for PathBuf {}
1714: impl cmp::PartialOrd for PathBuf {
1721: impl cmp::Ord for PathBuf {
1728: impl AsRef<OsStr> for PathBuf {
2800: impl AsRef<Path> for PathBuf {
2807: impl<'a> IntoIterator for &'a PathBuf {
1903:     pub fn to_path_buf(&self) -> PathBuf {
2671:     pub fn into_path_buf(self: Box<Path>) -> PathBuf {
18: //! Cross-platform path manipulation.
20: //! This module provides two types, [`PathBuf`] and [`Path`] (akin to [`String`]
23: //! on strings according to the local platform's path syntax.
26: //! returned by the [`components`] method on [`Path`]. [`Component`]s roughly
27: //! correspond to the substrings between path separators (`/` or `\`). You can
28: //! reconstruct an equivalent path from components with the [`push`] method on
34: //! Path manipulation includes both parsing components from slices and building
37: //! To parse a path, you can create a [`Path`] slice from a [`str`]
41: //! use std::path::Path;
44: //! let path = Path::new("/tmp/foo/bar.txt");
46: //! let parent = path.parent();
47: //! assert_eq!(parent, Some(Path::new("/tmp/foo")));
49: //! let file_stem = path.file_stem();
52: //! let extension = path.extension();
59: //! use std::path::PathBuf;
62: //! let mut path = PathBuf::from("c:\\");
64: //! path.push("windows");
65: //! path.push("system32");
67: //! path.set_extension("dll");
71: //! let path: PathBuf = ["c:\\", "windows", "system32.dll"].iter().collect();
74: //! [`components`]: Path::components
96: use crate::sys::path::{is_sep_byte, is_verbatim_sep, parse_prefix, MAIN_SEP_STR};
112: /// Windows path prefixes, e.g., `C:` or `\\server\share`.
114: /// Windows uses a variety of path prefix styles, including references to drive
116: /// others. In addition, some path prefixes are "verbatim" (i.e., prefixed with
123: /// use std::path::{Component, Path, Prefix};
124: /// use std::path::Prefix::*;
127: /// fn get_path_prefix(s: &str) -> Prefix {
128: ///     let path = Path::new(s);
129: ///     match path.components().next().unwrap() {
197:     /// use std::path::Prefix::*;
229: /// Determines whether the character is one of the permitted path
235: /// use std::path;
237: /// assert!(path::is_separator('/')); // '/' works for both Unix and Windows
238: /// assert!(!path::is_separator('❤'));
245: /// The primary separator of path components for the current platform.
248: pub const MAIN_SEPARATOR: char = crate::sys::path::MAIN_SEP;
297:     let path = if let Some(p) = prefix { &s[p.len()..] } else { s };
298:     !path.is_empty() && is_sep_byte(path[0])
345: /// front and back of the path each keep track of what parts of the path have
348: /// Going front to back, a path is made up of a prefix, a starting
358: /// A structure wrapping a Windows path prefix as well as its unparsed string
374: /// use std::path::{Component, Path, Prefix};
377: /// let path = Path::new(r"c:\you\later\");
378: /// match path.components().next().unwrap() {
446: /// A single component of a path.
448: /// A `Component` roughly corresponds to a substring between path separators
452: /// created by the [`components`](Path::components) method on [`Path`].
457: /// use std::path::{Component, Path};
459: /// let path = Path::new("/tmp/foo/bar.txt");
460: /// let components = path.components().collect::<Vec<_>>();
471:     /// A Windows path prefix, e.g., `C:` or `\\server\share`.
481:     /// It represents a separator that designates that a path starts from root.
503:     /// use std::path::Path;
505:     /// let path = Path::new("./tmp/foo/bar.txt");
506:     /// let components: Vec<_> = path.components().map(|comp| comp.as_os_str()).collect();
516:             Component::Normal(path) => path,
528: impl AsRef<Path> for Component<'_> {
530:     fn as_ref(&self) -> &Path {
535: /// An iterator over the [`Component`]s of a [`Path`].
537: /// This `struct` is created by the [`components`] method on [`Path`].
543: /// use std::path::Path;
545: /// let path = Path::new("/tmp/foo/bar.txt");
547: /// for component in path.components() {
552: /// [`components`]: Path::components
556:     // The path left to parse components from
562:     // true if path *physically* has a root separator; for most Windows
573: /// An iterator over the [`Component`]s of a [`Path`], as [`OsStr`] slices.
575: /// This `struct` is created by the [`iter`] method on [`Path`].
578: /// [`iter`]: Path::iter
587:         struct DebugHelper<'a>(&'a Path);
595:         f.debug_tuple("Components").field(&DebugHelper(self.as_path())).finish()
617:     // Given the iteration so far, how much of the pre-State::Body path is left?
636:     /// Extracts a slice corresponding to the portion of the path remaining for iteration.
641:     /// use std::path::Path;
643:     /// let mut components = Path::new("/tmp/foo/bar.txt").components();
647:     /// assert_eq!(Path::new("foo/bar.txt"), components.as_path());
658:         unsafe { Path::from_u8_slice(comps.path) }
661:     /// Is the *original* path rooted?
674:     /// Should the normalized path include a leading . ?
679:         let mut iter = self.path[self.prefix_len()..].iter();
687:     // parse a given byte sequence into the corresponding path component
692:             // the beginning of a path, which is treated
704:         let (extra, comp) = match self.path.iter().position(|b| self.is_sep_byte(*b)) {
705:             None => (0, self.path),
706:             Some(i) => (1, &self.path[..i]),
716:         let (extra, comp) = match self.path[start..].iter().rposition(|b| self.is_sep_byte(*b)) {
717:             None => (0, &self.path[start..]),
718:             Some(i) => (1, &self.path[start + i + 1..]),
725:         while !self.path.is_empty() {
730:                 self.path = &self.path[size..];
737:         while self.path.len() > self.len_before_body() {
742:                 self.path = &self.path[..self.path.len() - size];
748: impl AsRef<Path> for Components<'_> {
750:     fn as_ref(&self) -> &Path {
751:         self.as_path()
758:         self.as_path().as_os_str()
764:         struct DebugHelper<'a>(&'a Path);
772:         f.debug_tuple("Iter").field(&DebugHelper(self.as_path())).finish()
777:     /// Extracts a slice corresponding to the portion of the path remaining for iteration.
782:     /// use std::path::Path;
784:     /// let mut iter = Path::new("/tmp/foo/bar.txt").iter();
788:     /// assert_eq!(Path::new("foo/bar.txt"), iter.as_path());
793:         self.inner.as_path()
797: impl AsRef<Path> for Iter<'_> {
799:     fn as_ref(&self) -> &Path {
800:         self.as_path()
807:         self.as_path().as_os_str()
837:                     debug_assert!(self.prefix_len() <= self.path.len());
838:                     let raw = &self.path[..self.prefix_len()];
839:                     self.path = &self.path[self.prefix_len()..];
851:                         debug_assert!(!self.path.is_empty());
852:                         self.path = &self.path[1..];
859:                         debug_assert!(!self.path.is_empty());
860:                         self.path = &self.path[1..];
864:                 State::Body if !self.path.is_empty() => {
866:                     self.path = &self.path[size..];
885:                 State::Body if self.path.len() > self.len_before_body() => {
887:                     self.path = &self.path[..self.path.len() - size];
898:                         self.path = &self.path[..self.path.len() - 1];
905:                         self.path = &self.path[..self.path.len() - 1];
912:                         raw: unsafe { u8_slice_as_os_str(self.path) },
953:     // Fast path for long shared prefixes
958:     //   otherwise do it on the full path
960:     // The fast path isn't taken for paths with a PrefixComponent to avoid backtracking into
965:             match left.path.iter().zip(right.path.iter()).position(|(&a, &b)| a != b) {
966:                 None if left.path.len() == right.path.len() => return cmp::Ordering::Equal,
967:                 None => left.path.len().min(right.path.len()),
972:             left.path[..first_difference].iter().rposition(|&b| left.is_sep_byte(b))
975:             left.path = &left.path[mismatched_component_start..];
977:             right.path = &right.path[mismatched_component_start..];
985: /// An iterator over [`Path`] and its ancestors.
987: /// This `struct` is created by the [`ancestors`] method on [`Path`].
993: /// use std::path::Path;
995: /// let path = Path::new("/foo/bar");
997: /// for ancestor in path.ancestors() {
1002: /// [`ancestors`]: Path::ancestors
1006:     next: Option<&'a Path>,
1010:     type Item = &'a Path;
1015:         self.next = next.and_then(Path::parent);
1026: /// An owned, mutable path (akin to [`String`]).
1029: /// the path in place. It also implements [`Deref`] to [`Path`], meaning that
1030: /// all methods on [`Path`] slices are available on `PathBuf` values as well.
1044: /// use std::path::PathBuf;
1046: /// let mut path = PathBuf::new();
1048: /// path.push(r"C:\");
1049: /// path.push("windows");
1050: /// path.push("system32");
1052: /// path.set_extension("dll");
1059: /// use std::path::PathBuf;
1061: /// let path: PathBuf = [r"C:\", "windows", "system32.dll"].iter().collect();
1068: /// use std::path::PathBuf;
1070: /// let path = PathBuf::from(r"C:\windows\system32.dll");
1096:     /// use std::path::PathBuf;
1098:     /// let path = PathBuf::new();
1112:     /// use std::path::PathBuf;
1114:     /// let mut path = PathBuf::with_capacity(10);
1115:     /// let capacity = path.capacity();
1118:     /// path.push(r"C:\");
1120:     /// assert_eq!(capacity, path.capacity());
1130:     /// Coerces to a [`Path`] slice.
1135:     /// use std::path::{Path, PathBuf};
1138:     /// assert_eq!(Path::new("/test"), p.as_path());
1147:     /// Extends `self` with `path`.
1149:     /// If `path` is absolute, it replaces the current path.
1153:     /// * if `path` has a root but no prefix (e.g., `\windows`), it
1155:     /// * if `path` has a prefix but no root, it replaces `self`.
1157:     ///   and `path` is not empty, the new path is normalized: all references
1162:     /// Pushing a relative path extends the existing path:
1165:     /// use std::path::PathBuf;
1167:     /// let mut path = PathBuf::from("/tmp");
1168:     /// path.push("file.bk");
1169:     /// assert_eq!(path, PathBuf::from("/tmp/file.bk"));
1172:     /// Pushing an absolute path replaces the existing path:
1175:     /// use std::path::PathBuf;
1177:     /// let mut path = PathBuf::from("/tmp");
1178:     /// path.push("/etc");
1179:     /// assert_eq!(path, PathBuf::from("/etc"));
1181:     pub fn push<P: AsRef<Path>>(&mut self, path: P) {
1182:         self._push(path.as_ref())
1185:     fn _push(&mut self, path: &Path) {
1193:             && comps.prefix_len() == comps.path.len()
1199:         // absolute `path` replaces `self`
1200:         if path.is_absolute() || path.prefix().is_some() {
1204:         } else if comps.prefix_verbatim() && !path.inner.is_empty() {
1206:             for c in path.components() {
1243:         // `path` has a root but no prefix, e.g., `\windows` (Windows only)
1244:         } else if path.has_root() {
1248:         // `path` is a pure relative path
1253:         self.inner.push(path);
1261:     /// [`self.parent`]: Path::parent
1266:     /// use std::path::{Path, PathBuf};
1271:     /// assert_eq!(Path::new("/spirited"), p);
1273:     /// assert_eq!(Path::new("/"), p);
1291:     /// `file_name`. The new path will be a sibling of the original path.
1294:     /// [`self.file_name`]: Path::file_name
1300:     /// use std::path::PathBuf;
1330:     /// [`self.file_name`]: Path::file_name
1331:     /// [`self.extension`]: Path::extension
1336:     /// use std::path::{Path, PathBuf};
1341:     /// assert_eq!(Path::new("/feel/the.force"), p.as_path());
1344:     /// assert_eq!(Path::new("/feel/the.dark_side"), p.as_path());
1378:     /// use std::path::PathBuf;
1389:     /// Converts this `PathBuf` into a [boxed](Box) [`Path`].
1393:         let rw = Box::into_raw(self.inner.into_boxed_os_str()) as *mut Path;
1460: impl From<&Path> for Box<Path> {
1461:     /// Creates a boxed [`Path`] from a reference.
1463:     /// This will allocate and clone `path` to it.
1464:     fn from(path: &Path) -> Box<Path> {
1465:         let boxed: Box<OsStr> = path.inner.into();
1466:         let rw = Box::into_raw(boxed) as *mut Path;
1471: impl From<Cow<'_, Path>> for Box<Path> {
1472:     /// Creates a boxed [`Path`] from a clone-on-write pointer.
1476:     fn from(cow: Cow<'_, Path>) -> Box<Path> {
1478:             Cow::Borrowed(path) => Box::from(path),
1479:             Cow::Owned(path) => Box::from(path),
1485:     /// Converts a `Box<Path>` into a `PathBuf`
1489:     fn from(boxed: Box<Path>) -> PathBuf {
1490:         boxed.into_path_buf()
1494: impl From<PathBuf> for Box<Path> {
1495:     /// Converts a `PathBuf` into a `Box<Path>`
1500:     fn from(p: PathBuf) -> Box<Path> {
1501:         p.into_boxed_path()
1505: impl Clone for Box<Path> {
1508:         self.to_path_buf().into_boxed_path()
1537:     fn from(path_buf: PathBuf) -> OsString {
1538:         path_buf.inner
1587:     type Target = Path;
1589:     fn deref(&self) -> &Path {
1590:         Path::new(&self.inner)
1596:     fn borrow(&self) -> &Path {
1608: impl<'a> From<&'a Path> for Cow<'a, Path> {
1610:     /// [`Path`].
1614:     fn from(s: &'a Path) -> Cow<'a, Path> {
1619: impl<'a> From<PathBuf> for Cow<'a, Path> {
1625:     fn from(s: PathBuf) -> Cow<'a, Path> {
1630: impl<'a> From<&'a PathBuf> for Cow<'a, Path> {
1636:     fn from(p: &'a PathBuf) -> Cow<'a, Path> {
1637:         Cow::Borrowed(p.as_path())
1642:     /// Converts a clone-on-write pointer to an owned path.
1646:     fn from(p: Cow<'a, Path>) -> Self {
1651: impl From<PathBuf> for Arc<Path> {
1654:     fn from(s: PathBuf) -> Arc<Path> {
1656:         unsafe { Arc::from_raw(Arc::into_raw(arc) as *const Path) }
1660: impl From<&Path> for Arc<Path> {
1661:     /// Converts a [`Path`] into an [`Arc`] by copying the [`Path`] data into a new [`Arc`] buffer.
1663:     fn from(s: &Path) -> Arc<Path> {
1665:         unsafe { Arc::from_raw(Arc::into_raw(arc) as *const Path) }
1669: impl From<PathBuf> for Rc<Path> {
1672:     fn from(s: PathBuf) -> Rc<Path> {
1674:         unsafe { Rc::from_raw(Rc::into_raw(rc) as *const Path) }
1678: impl From<&Path> for Rc<Path> {
1679:     /// Converts a [`Path`] into an [`Rc`] by copying the [`Path`] data into a new `Rc` buffer.
1681:     fn from(s: &Path) -> Rc<Path> {
1683:         unsafe { Rc::from_raw(Rc::into_raw(rc) as *const Path) }
1691:         self.to_path_buf()
1708:         self.as_path().hash(h)
1735: /// A slice of a path (akin to [`str`]).
1737: /// This type supports a number of operations for inspecting a path, including
1738: /// breaking the path into its components (separated by `/` on Unix and by either
1739: /// `/` or `\` on Windows), extracting the file name, determining whether the path
1752: /// use std::path::Path;
1756: /// let path = Path::new("./foo/bar.txt");
1758: /// let parent = path.parent();
1759: /// assert_eq!(parent, Some(Path::new("./foo")));
1761: /// let file_stem = path.file_stem();
1764: /// let extension = path.extension();
1767: #[cfg_attr(not(test), rustc_diagnostic_item = "Path")]
1769: // `Path::new` current implementation relies
1770: // on `Path` being layout-compatible with `OsStr`.
1771: // When attribute privacy is implemented, `Path` should be annotated as `#[repr(transparent)]`.
1772: // Anyway, `Path` representation and layout are considered implementation detail, are
1778: /// An error returned from [`Path::strip_prefix`] if the prefix was not found.
1780: /// This `struct` is created by the [`strip_prefix`] method on [`Path`].
1783: /// [`strip_prefix`]: Path::strip_prefix
1788:     // The following (private!) function allows construction of a path from a u8
1790:     unsafe fn from_u8_slice(s: &[u8]) -> &Path {
1791:         Path::new(u8_slice_as_os_str(s))
1798:     /// Directly wraps a string slice as a `Path` slice.
1805:     /// use std::path::Path;
1807:     /// Path::new("foo.txt");
1810:     /// You can create `Path`s from `String`s, or even other `Path`s:
1813:     /// use std::path::Path;
1816:     /// let from_string = Path::new(&string);
1817:     /// let from_path = Path::new(&from_string);
1818:     /// assert_eq!(from_string, from_path);
1820:     pub fn new<S: AsRef<OsStr> + ?Sized>(s: &S) -> &Path {
1821:         unsafe { &*(s.as_ref() as *const OsStr as *const Path) }
1829:     /// use std::path::Path;
1831:     /// let os_str = Path::new("foo.txt").as_os_str();
1840:     /// Yields a [`&str`] slice if the `Path` is valid unicode.
1851:     /// use std::path::Path;
1853:     /// let path = Path::new("foo.txt");
1854:     /// assert_eq!(path.to_str(), Some("foo.txt"));
1863:     /// Converts a `Path` to a [`Cow<str>`].
1872:     /// Calling `to_string_lossy` on a `Path` with valid unicode:
1875:     /// use std::path::Path;
1877:     /// let path = Path::new("foo.txt");
1878:     /// assert_eq!(path.to_string_lossy(), "foo.txt");
1881:     /// Had `path` contained invalid unicode, the `to_string_lossy` call might
1890:     /// Converts a `Path` to an owned [`PathBuf`].
1895:     /// use std::path::Path;
1897:     /// let path_buf = Path::new("foo.txt").to_path_buf();
1898:     /// assert_eq!(path_buf, std::path::PathBuf::from("foo.txt"));
1907:     /// Returns `true` if the `Path` is absolute, i.e., if it is independent of
1910:     /// * On Unix, a path is absolute if it starts with the root, so
1913:     /// * On Windows, a path is absolute if it has a prefix and starts with the
1919:     /// use std::path::Path;
1921:     /// assert!(!Path::new("foo.txt").is_absolute());
1924:     /// [`has_root`]: Path::has_root
1931:     /// Returns `true` if the `Path` is relative, i.e., not absolute.
1938:     /// use std::path::Path;
1940:     /// assert!(Path::new("foo.txt").is_relative());
1943:     /// [`is_absolute`]: Path::is_absolute
1954:     /// Returns `true` if the `Path` has a root.
1956:     /// * On Unix, a path has a root if it begins with `/`.
1958:     /// * On Windows, a path has a root if it:
1966:     /// use std::path::Path;
1968:     /// assert!(Path::new("/etc/passwd").has_root());
1976:     /// Returns the `Path` without its final component, if there is one.
1978:     /// Returns [`None`] if the path terminates in a root or prefix.
1983:     /// use std::path::Path;
1985:     /// let path = Path::new("/foo/bar");
1986:     /// let parent = path.parent().unwrap();
1987:     /// assert_eq!(parent, Path::new("/foo"));
1990:     /// assert_eq!(grand_parent, Path::new("/"));
1994:     pub fn parent(&self) -> Option<&Path> {
1999:                 Some(comps.as_path())
2005:     /// Produces an iterator over `Path` and its ancestors.
2007:     /// The iterator will yield the `Path` that is returned if the [`parent`] method is used zero
2016:     /// use std::path::Path;
2018:     /// let mut ancestors = Path::new("/foo/bar").ancestors();
2019:     /// assert_eq!(ancestors.next(), Some(Path::new("/foo/bar")));
2020:     /// assert_eq!(ancestors.next(), Some(Path::new("/foo")));
2021:     /// assert_eq!(ancestors.next(), Some(Path::new("/")));
2024:     /// let mut ancestors = Path::new("../foo/bar").ancestors();
2025:     /// assert_eq!(ancestors.next(), Some(Path::new("../foo/bar")));
2026:     /// assert_eq!(ancestors.next(), Some(Path::new("../foo")));
2027:     /// assert_eq!(ancestors.next(), Some(Path::new("..")));
2028:     /// assert_eq!(ancestors.next(), Some(Path::new("")));
2032:     /// [`parent`]: Path::parent
2038:     /// Returns the final component of the `Path`, if there is one.
2040:     /// If the path is a normal file, this is the file name. If it's the path of a directory, this
2043:     /// Returns [`None`] if the path terminates in `..`.
2048:     /// use std::path::Path;
2051:     /// assert_eq!(Some(OsStr::new("bin")), Path::new("/usr/bin/").file_name());
2052:     /// assert_eq!(Some(OsStr::new("foo.txt")), Path::new("tmp/foo.txt").file_name());
2053:     /// assert_eq!(Some(OsStr::new("foo.txt")), Path::new("foo.txt/.").file_name());
2054:     /// assert_eq!(Some(OsStr::new("foo.txt")), Path::new("foo.txt/.//").file_name());
2055:     /// assert_eq!(None, Path::new("foo.txt/..").file_name());
2056:     /// assert_eq!(None, Path::new("/").file_name());
2066:     /// Returns a path that, when joined onto `base`, yields `self`.
2073:     /// [`starts_with`]: Path::starts_with
2078:     /// use std::path::{Path, PathBuf};
2080:     /// let path = Path::new("/test/haha/foo.txt");
2082:     /// assert_eq!(path.strip_prefix("/"), Ok(Path::new("test/haha/foo.txt")));
2083:     /// assert_eq!(path.strip_prefix("/test"), Ok(Path::new("haha/foo.txt")));
2084:     /// assert_eq!(path.strip_prefix("/test/"), Ok(Path::new("haha/foo.txt")));
2085:     /// assert_eq!(path.strip_prefix("/test/haha/foo.txt"), Ok(Path::new("")));
2086:     /// assert_eq!(path.strip_prefix("/test/haha/foo.txt/"), Ok(Path::new("")));
2088:     /// assert!(path.strip_prefix("test").is_err());
2089:     /// assert!(path.strip_prefix("/haha").is_err());
2092:     /// assert_eq!(path.strip_prefix(prefix), Ok(Path::new("haha/foo.txt")));
2094:     pub fn strip_prefix<P>(&self, base: P) -> Result<&Path, StripPrefixError>
2096:         P: AsRef<Path>,
2101:     fn _strip_prefix(&self, base: &Path) -> Result<&Path, StripPrefixError> {
2103:             .map(|c| c.as_path())
2109:     /// Only considers whole path components to match.
2114:     /// use std::path::Path;
2116:     /// let path = Path::new("/etc/passwd");
2118:     /// assert!(path.starts_with("/etc"));
2119:     /// assert!(path.starts_with("/etc/"));
2120:     /// assert!(path.starts_with("/etc/passwd"));
2121:     /// assert!(path.starts_with("/etc/passwd/")); // extra slash is okay
2122:     /// assert!(path.starts_with("/etc/passwd///")); // multiple extra slashes are okay
2124:     /// assert!(!path.starts_with("/e"));
2125:     /// assert!(!path.starts_with("/etc/passwd.txt"));
2127:     /// assert!(!Path::new("/etc/foo.rs").starts_with("/etc/foo"));
2130:     pub fn starts_with<P: AsRef<Path>>(&self, base: P) -> bool {
2134:     fn _starts_with(&self, base: &Path) -> bool {
2140:     /// Only considers whole path components to match.
2145:     /// use std::path::Path;
2147:     /// let path = Path::new("/etc/resolv.conf");
2149:     /// assert!(path.ends_with("resolv.conf"));
2150:     /// assert!(path.ends_with("etc/resolv.conf"));
2151:     /// assert!(path.ends_with("/etc/resolv.conf"));
2153:     /// assert!(!path.ends_with("/resolv.conf"));
2154:     /// assert!(!path.ends_with("conf")); // use .extension() instead
2157:     pub fn ends_with<P: AsRef<Path>>(&self, child: P) -> bool {
2161:     fn _ends_with(&self, child: &Path) -> bool {
2167:     /// [`self.file_name`]: Path::file_name
2179:     /// use std::path::Path;
2181:     /// assert_eq!("foo", Path::new("foo.rs").file_stem().unwrap());
2182:     /// assert_eq!("foo.tar", Path::new("foo.tar.gz").file_stem().unwrap());
2186:     /// This method is similar to [`Path::file_prefix`], which extracts the portion of the file name
2189:     /// [`Path::file_prefix`]: Path::file_prefix
2206:     /// [`self.file_name`]: Path::file_name
2211:     /// # #![feature(path_file_prefix)]
2212:     /// use std::path::Path;
2214:     /// assert_eq!("foo", Path::new("foo.rs").file_prefix().unwrap());
2215:     /// assert_eq!("foo", Path::new("foo.tar.gz").file_prefix().unwrap());
2219:     /// This method is similar to [`Path::file_stem`], which extracts the portion of the file name
2222:     /// [`Path::file_stem`]: Path::file_stem
2238:     /// [`self.file_name`]: Path::file_name
2243:     /// use std::path::Path;
2245:     /// assert_eq!("rs", Path::new("foo.rs").extension().unwrap());
2246:     /// assert_eq!("gz", Path::new("foo.tar.gz").extension().unwrap());
2253:     /// Creates an owned [`PathBuf`] with `path` adjoined to `self`.
2255:     /// See [`PathBuf::push`] for more details on what it means to adjoin a path.
2260:     /// use std::path::{Path, PathBuf};
2262:     /// assert_eq!(Path::new("/etc").join("passwd"), PathBuf::from("/etc/passwd"));
2265:     pub fn join<P: AsRef<Path>>(&self, path: P) -> PathBuf {
2266:         self._join(path.as_ref())
2269:     fn _join(&self, path: &Path) -> PathBuf {
2270:         let mut buf = self.to_path_buf();
2271:         buf.push(path);
2282:     /// use std::path::{Path, PathBuf};
2284:     /// let path = Path::new("/tmp/foo.txt");
2285:     /// assert_eq!(path.with_file_name("bar.txt"), PathBuf::from("/tmp/bar.txt"));
2287:     /// let path = Path::new("/tmp");
2288:     /// assert_eq!(path.with_file_name("var"), PathBuf::from("/var"));
2296:         let mut buf = self.to_path_buf();
2308:     /// use std::path::{Path, PathBuf};
2310:     /// let path = Path::new("foo.rs");
2311:     /// assert_eq!(path.with_extension("txt"), PathBuf::from("foo.txt"));
2313:     /// let path = Path::new("foo.tar.gz");
2314:     /// assert_eq!(path.with_extension(""), PathBuf::from("foo.tar"));
2315:     /// assert_eq!(path.with_extension("xz"), PathBuf::from("foo.tar.xz"));
2316:     /// assert_eq!(path.with_extension("").with_extension("txt"), PathBuf::from("foo.txt"));
2323:         let mut buf = self.to_path_buf();
2328:     /// Produces an iterator over the [`Component`]s of the path.
2330:     /// When parsing the path, there is a small amount of normalization:
2336:     ///   beginning of the path. For example, `a/./b`, `a/b/`, `a/b/.` and
2349:     /// use std::path::{Path, Component};
2352:     /// let mut components = Path::new("/tmp/foo.txt").components();
2364:             path: self.as_u8_slice(),
2372:     /// Produces an iterator over the path's components viewed as [`OsStr`]
2375:     /// For more information about the particulars of how the path is separated
2378:     /// [`components`]: Path::components
2383:     /// use std::path::{self, Path};
2386:     /// let mut it = Path::new("/tmp/foo.txt").iter();
2387:     /// assert_eq!(it.next(), Some(OsStr::new(&path::MAIN_SEPARATOR.to_string())));
2400:     /// escapes the path please use [`Debug`] instead.
2407:     /// use std::path::Path;
2409:     /// let path = Path::new("/tmp/foo.rs");
2411:     /// println!("{}", path.display());
2413:     #[must_use = "this does not display the path, \
2417:         Display { path: self }
2430:     /// use std::path::Path;
2432:     /// let path = Path::new("/Minas/tirith");
2433:     /// let metadata = path.metadata().expect("metadata call failed");
2449:     /// use std::path::Path;
2451:     /// let path = Path::new("/Minas/tirith");
2452:     /// let metadata = path.symlink_metadata().expect("symlink_metadata call failed");
2461:     /// Returns the canonical, absolute form of the path with all intermediate
2469:     /// use std::path::{Path, PathBuf};
2471:     /// let path = Path::new("/foo/test/../test/bar.rs");
2472:     /// assert_eq!(path.canonicalize().unwrap(), PathBuf::from("/foo/test/bar.rs"));
2487:     /// use std::path::Path;
2489:     /// let path = Path::new("/laputa/sky_castle.rs");
2490:     /// let path_link = path.read_link().expect("read_link call failed");
2508:     /// use std::path::Path;
2510:     /// let path = Path::new("/laputa");
2511:     /// for entry in path.read_dir().expect("read_dir call failed") {
2513:     ///         println!("{:?}", entry.path());
2523:     /// Returns `true` if the path points at an existing entity.
2534:     /// use std::path::Path;
2535:     /// assert!(!Path::new("does_not_exist.txt").exists());
2549:     /// Returns `Ok(true)` if the path points at an existing entity.
2555:     /// unrelated to the path not existing. (E.g. it will return `Err(_)` in case of permission
2561:     /// #![feature(path_try_exists)]
2563:     /// use std::path::Path;
2564:     /// assert!(!Path::new("does_not_exist.txt").try_exists().expect("Can't check existence of file does_not_exist.txt"))...(1 bytes skipped)...
2565:     /// assert!(Path::new("/root/secret_file.txt").try_exists().is_err());
2575:     /// Returns `true` if the path exists on disk and is pointing at a regular file.
2586:     /// use std::path::Path;
2587:     /// assert_eq!(Path::new("./is_a_directory/").is_file(), false);
2588:     /// assert_eq!(Path::new("a_file.txt").is_file(), true);
2608:     /// Returns `true` if the path exists on disk and is pointing at a directory.
2619:     /// use std::path::Path;
2620:     /// assert_eq!(Path::new("./is_a_directory/").is_dir(), true);
2621:     /// assert_eq!(Path::new("a_file.txt").is_dir(), false);
2635:     /// Returns `true` if the path exists on disk and is pointing at a symbolic link.
2648:     /// use std::path::Path;
2651:     /// let link_path = Path::new("link");
2652:     /// symlink("/origin_does_not_exists/", link_path).unwrap();
2653:     /// assert_eq!(link_path.is_symlink(), true);
2654:     /// assert_eq!(link_path.exists(), false);
2668:     /// Converts a [`Box<Path>`](Box) into a [`PathBuf`] without copying or
2693: /// A [`Path`] might contain non-Unicode data. This `struct` implements the
2695: /// [`display`](Path::display) method on [`Path`]. This may perform lossy
2697: /// which escapes the path please use [`Debug`] instead.
2702: /// use std::path::Path;
2704: /// let path = Path::new("/tmp/foo.rs");
2706: /// println!("{}", path.display());
2717:         fmt::Debug::fmt(&self.path, f)
2723:         self.path.inner.display(f)
2729:     fn eq(&self, other: &Path) -> bool {
2746:     fn partial_cmp(&self, other: &Path) -> Option<cmp::Ordering> {
2753:     fn cmp(&self, other: &Path) -> cmp::Ordering {
2760:     fn as_ref(&self) -> &Path {
2765: impl AsRef<Path> for OsStr {
2767:     fn as_ref(&self) -> &Path {
2768:         Path::new(self)
2772: impl AsRef<Path> for Cow<'_, OsStr> {
2774:     fn as_ref(&self) -> &Path {
2775:         Path::new(self)
2779: impl AsRef<Path> for OsString {
2781:     fn as_ref(&self) -> &Path {
2782:         Path::new(self)
2786: impl AsRef<Path> for str {
2788:     fn as_ref(&self) -> &Path {
2789:         Path::new(self)
2793: impl AsRef<Path> for String {
2795:     fn as_ref(&self) -> &Path {
2796:         Path::new(self)
2802:     fn as_ref(&self) -> &Path {
2830:                 <Path as PartialEq>::eq(self, other)
2837:                 <Path as PartialEq>::eq(self, other)
2844:                 <Path as PartialOrd>::partial_cmp(self, other)
2851:                 <Path as PartialOrd>::partial_cmp(self, other)
2857: impl_cmp!(PathBuf, Path);
2858: impl_cmp!(PathBuf, &'a Path);
2859: impl_cmp!(Cow<'a, Path>, Path);
2860: impl_cmp!(Cow<'a, Path>, &'b Path);
2861: impl_cmp!(Cow<'a, Path>, PathBuf);
2868:                 <Path as PartialEq>::eq(self, other.as_ref())
2875:                 <Path as PartialEq>::eq(self.as_ref(), other)
2882:                 <Path as PartialOrd>::partial_cmp(self, other.as_ref())
2889:                 <Path as PartialOrd>::partial_cmp(self.as_ref(), other)
2899: impl_cmp_os_str!(Path, OsStr);
2900: impl_cmp_os_str!(Path, &'a OsStr);
2901: impl_cmp_os_str!(Path, Cow<'a, OsStr>);
2902: impl_cmp_os_str!(Path, OsString);
2903: impl_cmp_os_str!(&'a Path, OsStr);
2904: impl_cmp_os_str!(&'a Path, Cow<'b, OsStr>);
2905: impl_cmp_os_str!(&'a Path, OsString);
2906: impl_cmp_os_str!(Cow<'a, Path>, OsStr);
2907: impl_cmp_os_str!(Cow<'a, Path>, &'b OsStr);
2908: impl_cmp_os_str!(Cow<'a, Path>, OsString);
21: //! and [`str`]), for working with paths abstractly. These types are thin wrappers
25: //! Paths can be parsed into [`Component`]s by iterating over the structure
29: //! [`PathBuf`]; note that the paths may differ syntactically by the
35: //! new owned paths.
56: //! To build or modify paths, use [`PathBuf`]:
75: //! [`push`]: PathBuf::push
1032: /// [`push`]: PathBuf::push
1033: /// [`set_extension`]: PathBuf::set_extension
1040: /// You can use [`push`] to build up a `PathBuf` from
1074: #[cfg_attr(not(test), rustc_diagnostic_item = "PathBuf")]
1076: // `PathBuf::as_mut_vec` current implementation relies
1077: // on `PathBuf` being layout-compatible with `Vec<u8>`.
1078: // When attribute privacy is implemented, `PathBuf` should be annotated as `#[repr(transparent)]`.
1079: // Anyway, `PathBuf` representation and layout are considered implementation detail, are
1088:         unsafe { &mut *(self as *mut PathBuf as *mut Vec<u8>) }
1091:     /// Allocates an empty `PathBuf`.
1102:     pub fn new() -> PathBuf {
1103:         PathBuf { inner: OsString::new() }
1106:     /// Creates a new `PathBuf` with a given capacity used to create the
1126:     pub fn with_capacity(capacity: usize) -> PathBuf {
1127:         PathBuf { inner: OsString::with_capacity(capacity) }
1137:     /// let p = PathBuf::from("/test");
1203:         // verbatim paths need . and .. removed
1268:     /// let mut p = PathBuf::from("/spirited/away.rs");
1295:     /// [`pop`]: PathBuf::pop
1302:     /// let mut buf = PathBuf::from("/");
1305:     /// assert!(buf == PathBuf::from("/bar"));
1308:     /// assert!(buf == PathBuf::from("/baz.txt"));
1338:     /// let mut p = PathBuf::from("/feel/the");
1373:     /// Consumes the `PathBuf`, yielding its internal [`OsString`] storage.
1380:     /// let p = PathBuf::from("/the/head");
1451:         PathBuf { inner: self.inner.clone() }
1513:     /// Converts a borrowed `OsStr` to a `PathBuf`.
1515:     /// Allocates a [`PathBuf`] and copies the data into it.
1517:     fn from(s: &T) -> PathBuf {
1518:         PathBuf::from(s.as_ref().to_os_string())
1523:     /// Converts an [`OsString`] into a [`PathBuf`]
1527:     fn from(s: OsString) -> PathBuf {
1528:         PathBuf { inner: s }
1532: impl From<PathBuf> for OsString {
1533:     /// Converts a [`PathBuf`] into an [`OsString`]
1543:     /// Converts a [`String`] into a [`PathBuf`]
1547:     fn from(s: String) -> PathBuf {
1548:         PathBuf::from(OsString::from(s))
1557:         Ok(PathBuf::from(s))
1562:     fn from_iter<I: IntoIterator<Item = P>>(iter: I) -> PathBuf {
1563:         let mut buf = PathBuf::new();
1604:         PathBuf::new()
1621:     /// instance of [`PathBuf`].
1632:     /// [`PathBuf`].
1652:     /// Converts a [`PathBuf`] into an [`Arc`] by moving the [`PathBuf`] data into a new [`Arc`] buffer.
1670:     /// Converts a [`PathBuf`] into an [`Rc`] by moving the [`PathBuf`] data into a new `Rc` buffer.
1688:     type Owned = PathBuf;
1690:     fn to_owned(&self) -> PathBuf {
1694:     fn clone_into(&self, target: &mut PathBuf) {
1701:     fn eq(&self, other: &PathBuf) -> bool {
1716:     fn partial_cmp(&self, other: &PathBuf) -> Option<cmp::Ordering> {
1723:     fn cmp(&self, other: &PathBuf) -> cmp::Ordering {
1744: /// see [`PathBuf`].
1904:         PathBuf::from(self.inner.to_os_string())
2091:     /// let prefix = PathBuf::from("/test/");
2275:     /// Creates an owned [`PathBuf`] like `self` but with the given file name.
2277:     /// See [`PathBuf::set_file_name`] for more details.
2291:     pub fn with_file_name<S: AsRef<OsStr>>(&self, file_name: S) -> PathBuf {
2295:     fn _with_file_name(&self, file_name: &OsStr) -> PathBuf {
2301:     /// Creates an owned [`PathBuf`] like `self` but with the given extension.
2303:     /// See [`PathBuf::set_extension`] for more details.
2318:     pub fn with_extension<S: AsRef<OsStr>>(&self, extension: S) -> PathBuf {
2322:     fn _with_extension(&self, extension: &OsStr) -> PathBuf {
2397:     /// Returns an object that implements [`Display`] for safely printing paths
2476:     pub fn canonicalize(&self) -> io::Result<PathBuf> {
2494:     pub fn read_link(&self) -> io::Result<PathBuf> {
2674:         PathBuf { inner: OsString::from(inner) }
2691: /// Helper struct for safely printing paths with [`format!`] and `{}`.
2895: impl_cmp_os_str!(PathBuf, OsStr);
2896: impl_cmp_os_str!(PathBuf, &'a OsStr);
2897: impl_cmp_os_str!(PathBuf, Cow<'a, OsStr>);
2898: impl_cmp_os_str!(PathBuf, OsString);
github.com/apache/servicecomb-service-center:datasource/etcd/path/key_generator.go: [ master, ]
18: package path
github.com/apache/incubator-teaclave:third_party/rust-sgx-sdk/sgx_tstd/src/path.rs: [ master, ]
392:     path: &'a [u8],
1202: impl ToOwned for Path {
1262: pub struct Path {
1277: impl Path {
1730: impl AsRef<OsStr> for Path {
1736: impl fmt::Debug for Path {
1749:     path: &'a Path,
1764: impl cmp::PartialEq for Path {
1770: impl Hash for Path {
1778: impl cmp::Eq for Path {}
1780: impl cmp::PartialOrd for Path {
1786: impl cmp::Ord for Path {
1792: impl AsRef<Path> for Path {
1844: impl<'a> IntoIterator for &'a Path {
475:     pub fn as_path(&self) -> &'a Path {
602:     pub fn as_path(&self) -> &'a Path {
823:     pub fn as_path(&self) -> &Path {
968:     pub fn into_boxed_path(self) -> Box<Path> {
797: pub struct PathBuf {
801: impl PathBuf {
1030: impl From<Box<Path>> for PathBuf {
1056: impl<T: ?Sized + AsRef<OsStr>> From<&T> for PathBuf {
1062: impl From<OsString> for PathBuf {
1081: impl From<String> for PathBuf {
1090: impl FromStr for PathBuf {
1098: impl<P: AsRef<Path>> iter::FromIterator<P> for PathBuf {
1106: impl<P: AsRef<Path>> iter::Extend<P> for PathBuf {
1112: impl fmt::Debug for PathBuf {
1118: impl ops::Deref for PathBuf {
1126: impl Borrow<Path> for PathBuf {
1132: impl Default for PathBuf {
1159: impl<'a> From<Cow<'a, Path>> for PathBuf {
1212: impl cmp::PartialEq for PathBuf {
1218: impl Hash for PathBuf {
1224: impl cmp::Eq for PathBuf {}
1226: impl cmp::PartialOrd for PathBuf {
1232: impl cmp::Ord for PathBuf {
1238: impl AsRef<OsStr> for PathBuf {
1829: impl AsRef<Path> for PathBuf {
1836: impl<'a> IntoIterator for &'a PathBuf {
1333:     pub fn to_path_buf(&self) -> PathBuf {
1723:     pub fn into_path_buf(self: Box<Path>) -> PathBuf {
18: //! Cross-platform path manipulation.
20: //! This module provides two types, [`PathBuf`] and [`Path`] (akin to [`String`]
23: //! on strings according to the local platform's path syntax.
26: //! returned by the [`components`] method on [`Path`]. [`Component`]s roughly
27: //! correspond to the substrings between path separators (`/` or `\`). You can
28: //! reconstruct an equivalent path from components with the [`push`] method on
39: use crate::sys::path::{is_sep_byte, is_verbatim_sep, parse_prefix, MAIN_SEP_STR};
65: /// Windows path prefixes, e.g., `C:` or `\\server\share`.
67: /// Windows uses a variety of path prefix styles, including references to drive
69: /// others. In addition, some path prefixes are "verbatim" (i.e., prefixed with
152: /// Determines whether the character is one of the permitted path
159: /// The primary separator of path components for the current platform.
162: pub const MAIN_SEPARATOR: char = crate::sys::path::MAIN_SEP;
210:     let path = if let Some(p) = prefix { &s[p.len()..] } else { s };
211:     !path.is_empty() && is_sep_byte(path[0])
242: /// front and back of the path each keep track of what parts of the path have
245: /// Going front to back, a path is made up of a prefix, a starting
255: /// A structure wrapping a Windows path prefix as well as its unparsed string
319: /// A single component of a path.
321: /// A `Component` roughly corresponds to a substring between path separators
325: /// created by the [`components`][`Path::components`] method on [`Path`].
330:     /// A Windows path prefix, e.g., `C:` or `\\server\share`.
342:     /// It represents a separator that designates that a path starts from root.
367:             Component::Normal(path) => path,
378: impl AsRef<Path> for Component<'_> {
379:     fn as_ref(&self) -> &Path {
384: /// An iterator over the [`Component`]s of a [`Path`].
386: /// This `struct` is created by the [`components`] method on [`Path`].
391:     // The path left to parse components from
397:     // true if path *physically* has a root separator; for most Windows
408: /// An iterator over the [`Component`]s of a [`Path`], as [`OsStr`] slices.
410: /// This `struct` is created by the [`iter`] method on [`Path`].
414: /// [`iter`]: struct.Path.html#method.iter
416: /// [`Path`]: struct.Path.html
424:         struct DebugHelper<'a>(&'a Path);
432:         f.debug_tuple("Components").field(&DebugHelper(self.as_path())).finish()
454:     // Given the iteration so far, how much of the pre-State::Body path is left?
473:     /// Extracts a slice corresponding to the portion of the path remaining for iteration.
483:         unsafe { Path::from_u8_slice(comps.path) }
486:     /// Is the *original* path rooted?
499:     /// Should the normalized path include a leading . ?
504:         let mut iter = self.path[self.prefix_len()..].iter();
512:     // parse a given byte sequence into the corresponding path component
517:             // the beginning of a path, which is treated
529:         let (extra, comp) = match self.path.iter().position(|b| self.is_sep_byte(*b)) {
530:             None => (0, self.path),
531:             Some(i) => (1, &self.path[..i]),
541:         let (extra, comp) = match self.path[start..].iter().rposition(|b| self.is_sep_byte(*b)) {
542:             None => (0, &self.path[start..]),
543:             Some(i) => (1, &self.path[start + i + 1..]),
550:         while !self.path.is_empty() {
555:                 self.path = &self.path[size..];
562:         while self.path.len() > self.len_before_body() {
567:                 self.path = &self.path[..self.path.len() - size];
573: impl AsRef<Path> for Components<'_> {
574:     fn as_ref(&self) -> &Path {
575:         self.as_path()
581:         self.as_path().as_os_str()
587:         struct DebugHelper<'a>(&'a Path);
595:         f.debug_tuple("Iter").field(&DebugHelper(self.as_path())).finish()
600:     /// Extracts a slice corresponding to the portion of the path remaining for iteration.
603:         self.inner.as_path()
607: impl AsRef<Path> for Iter<'_> {
608:     fn as_ref(&self) -> &Path {
609:         self.as_path()
615:         self.as_path().as_os_str()
643:                     debug_assert!(self.prefix_len() <= self.path.len());
644:                     let raw = &self.path[..self.prefix_len()];
645:                     self.path = &self.path[self.prefix_len()..];
657:                         debug_assert!(!self.path.is_empty());
658:                         self.path = &self.path[1..];
665:                         debug_assert!(!self.path.is_empty());
666:                         self.path = &self.path[1..];
670:                 State::Body if !self.path.is_empty() => {
672:                     self.path = &self.path[size..];
691:                 State::Body if self.path.len() > self.len_before_body() => {
693:                     self.path = &self.path[..self.path.len() - size];
704:                         self.path = &self.path[..self.path.len() - 1];
711:                         self.path = &self.path[..self.path.len() - 1];
718:                         raw: unsafe { u8_slice_as_os_str(self.path) },
755: /// An iterator over [`Path`] and its ancestors.
757: /// This `struct` is created by the [`ancestors`] method on [`Path`].
762:     next: Option<&'a Path>,
766:     type Item = &'a Path;
770:         self.next = next.and_then(Path::parent);
781: /// An owned, mutable path (akin to [`String`]).
784: /// the path in place. It also implements [`Deref`] to [`Path`], meaning that
785: /// all methods on [`Path`] slices are available on `PathBuf` values as well.
788: /// [`Path`]: struct.Path.html
819:     /// Coerces to a [`Path`] slice.
821:     /// [`Path`]: struct.Path.html
827:     /// Extends `self` with `path`.
829:     /// If `path` is absolute, it replaces the current path.
833:     /// * if `path` has a root but no prefix (e.g., `\windows`), it
835:     /// * if `path` has a prefix but no root, it replaces `self`.
837:     pub fn push<P: AsRef<Path>>(&mut self, path: P) {
838:         self._push(path.as_ref())
841:     fn _push(&mut self, path: &Path) {
849:                 && comps.prefix_len() == comps.path.len()
856:         // absolute `path` replaces `self`
857:         if path.is_absolute() || path.prefix().is_some() {
860:         // `path` has a root but no prefix, e.g., `\windows` (Windows only)
861:         } else if path.has_root() {
865:         // `path` is a pure relative path
870:         self.inner.push(path);
898:     /// `file_name`. The new path will be a sibling of the original path.
964:     /// Converts this `PathBuf` into a [boxed][`Box`] [`Path`].
967:     /// [`Path`]: struct.Path.html
969:         let rw = Box::into_raw(self.inner.into_boxed_os_str()) as *mut Path;
1022: impl From<&Path> for Box<Path> {
1023:     fn from(path: &Path) -> Box<Path> {
1024:         let boxed: Box<OsStr> = path.inner.into();
1025:         let rw = Box::into_raw(boxed) as *mut Path;
1031:     /// Converts a `Box<Path>` into a `PathBuf`
1034:     fn from(boxed: Box<Path>) -> PathBuf {
1035:         boxed.into_path_buf()
1039: impl From<PathBuf> for Box<Path> {
1040:     /// Converts a `PathBuf` into a `Box<Path>`
1044:     fn from(p: PathBuf) -> Box<Path> {
1045:         p.into_boxed_path()
1049: impl Clone for Box<Path> {
1052:         self.to_path_buf().into_boxed_path()
1076:     fn from(path_buf: PathBuf) -> OsString {
1077:         path_buf.inner
1119:     type Target = Path;
1121:     fn deref(&self) -> &Path {
1122:         Path::new(&self.inner)
1127:     fn borrow(&self) -> &Path {
1138: impl<'a> From<&'a Path> for Cow<'a, Path> {
1140:     fn from(s: &'a Path) -> Cow<'a, Path> {
1145: impl<'a> From<PathBuf> for Cow<'a, Path> {
1147:     fn from(s: PathBuf) -> Cow<'a, Path> {
1152: impl<'a> From<&'a PathBuf> for Cow<'a, Path> {
1154:     fn from(p: &'a PathBuf) -> Cow<'a, Path> {
1155:         Cow::Borrowed(p.as_path())
1161:     fn from(p: Cow<'a, Path>) -> Self {
1166: impl From<PathBuf> for Arc<Path> {
1169:     fn from(s: PathBuf) -> Arc<Path> {
1171:         unsafe { Arc::from_raw(Arc::into_raw(arc) as *const Path) }
1175: impl From<&Path> for Arc<Path> {
1176:     /// Converts a `Path` into an `Arc` by copying the `Path` data into a new `Arc` buffer.
1178:     fn from(s: &Path) -> Arc<Path> {
1180:         unsafe { Arc::from_raw(Arc::into_raw(arc) as *const Path) }
1184: impl From<PathBuf> for Rc<Path> {
1187:     fn from(s: PathBuf) -> Rc<Path> {
1189:         unsafe { Rc::from_raw(Rc::into_raw(rc) as *const Path) }
1193: impl From<&Path> for Rc<Path> {
1194:     /// Converts a `Path` into an `Rc` by copying the `Path` data into a new `Rc` buffer.
1196:     fn from(s: &Path) -> Rc<Path> {
1198:         unsafe { Rc::from_raw(Rc::into_raw(rc) as *const Path) }
1205:         self.to_path_buf()
1220:         self.as_path().hash(h)
1244: /// A slice of a path (akin to [`str`]).
1246: /// This type supports a number of operations for inspecting a path, including
1247: /// breaking the path into its components (separated by `/` on Unix and by either
1248: /// `/` or `\` on Windows), extracting the file name, determining whether the path
1266: /// An error returned from [`Path::strip_prefix`][`strip_prefix`] if the prefix
1269: /// This `struct` is created by the [`strip_prefix`] method on [`Path`].
1272: /// [`strip_prefix`]: struct.Path.html#method.strip_prefix
1273: /// [`Path`]: struct.Path.html
1278:     // The following (private!) function allows construction of a path from a u8
1280:     unsafe fn from_u8_slice(s: &[u8]) -> &Path {
1281:         Path::new(u8_slice_as_os_str(s))
1288:     /// Directly wraps a string slice as a `Path` slice.
1292:     pub fn new<S: AsRef<OsStr> + ?Sized>(s: &S) -> &Path {
1293:         unsafe { &*(s.as_ref() as *const OsStr as *const Path) }
1304:     /// Yields a [`&str`] slice if the `Path` is valid unicode.
1316:     /// Converts a `Path` to a [`Cow<str>`].
1328:     /// Converts a `Path` to an owned [`PathBuf`].
1337:     /// Returns `true` if the `Path` is absolute, i.e., if it is independent of
1340:     /// * On Unix, a path is absolute if it starts with the root, so
1343:     /// * On Windows, a path is absolute if it has a prefix and starts with the
1351:     /// Returns `true` if the `Path` is relative, i.e., not absolute.
1363:     /// Returns `true` if the `Path` has a root.
1365:     /// * On Unix, a path has a root if it begins with `/`.
1367:     /// * On Windows, a path has a root if it:
1376:     /// Returns the `Path` without its final component, if there is one.
1378:     /// Returns [`None`] if the path terminates in a root or prefix.
1382:     pub fn parent(&self) -> Option<&Path> {
1387:                 Some(comps.as_path())
1393:     /// Produces an iterator over `Path` and its ancestors.
1395:     /// The iterator will yield the `Path` that is returned if the [`parent`] method is used zero
1405:     /// Returns the final component of the `Path`, if there is one.
1407:     /// If the path is a normal file, this is the file name. If it's the path of a directory, this
1410:     /// Returns [`None`] if the path terminates in `..`.
1421:     /// Returns a path that, when joined onto `base`, yields `self`.
1431:     pub fn strip_prefix<P>(&self, base: P) -> Result<&Path, StripPrefixError>
1433:         P: AsRef<Path>,
1438:     fn _strip_prefix(&self, base: &Path) -> Result<&Path, StripPrefixError> {
1440:             .map(|c| c.as_path())
1446:     /// Only considers whole path components to match.
1448:     pub fn starts_with<P: AsRef<Path>>(&self, base: P) -> bool {
1452:     fn _starts_with(&self, base: &Path) -> bool {
1458:     /// Only considers whole path components to match.
1460:     pub fn ends_with<P: AsRef<Path>>(&self, child: P) -> bool {
1464:     fn _ends_with(&self, child: &Path) -> bool {
1470:     /// [`self.file_name`]: struct.Path.html#method.file_name
1494:     /// [`self.file_name`]: struct.Path.html#method.file_name
1501:     /// Creates an owned [`PathBuf`] with `path` adjoined to `self`.
1503:     /// See [`PathBuf::push`] for more details on what it means to adjoin a path.
1508:     pub fn join<P: AsRef<Path>>(&self, path: P) -> PathBuf {
1509:         self._join(path.as_ref())
1512:     fn _join(&self, path: &Path) -> PathBuf {
1513:         let mut buf = self.to_path_buf();
1514:         buf.push(path);
1530:         let mut buf = self.to_path_buf();
1547:         let mut buf = self.to_path_buf();
1552:     /// Produces an iterator over the [`Component`]s of the path.
1554:     /// When parsing the path, there is a small amount of normalization:
1560:     ///   beginning of the path. For example, `a/./b`, `a/b/`, `a/b/.` and
1573:             path: self.as_u8_slice(),
1581:     /// Produces an iterator over the path's components viewed as [`OsStr`]
1584:     /// For more information about the particulars of how the path is separated
1600:         Display { path: self }
1628:     /// Returns the canonical, absolute form of the path with all intermediate
1665:     /// use std::path::Path;
1667:     /// let path = Path::new("/laputa");
1668:     /// for entry in path.read_dir().expect("read_dir call failed") {
1670:     ///         println!("{:?}", entry.path());
1679:     /// Returns `true` if the path points at an existing entity.
1692:     /// Returns `true` if the path exists on disk and is pointing at a regular file.
1705:     /// Returns `true` if the path exists on disk and is pointing at a directory.
1718:     /// Converts a [`Box<Path>`][`Box`] into a [`PathBuf`] without copying or
1744: /// A [`Path`] might contain non-Unicode data. This `struct` implements the
1746: /// [`display`][`Path::display`] method on [`Path`].
1754:         fmt::Debug::fmt(&self.path, f)
1760:         self.path.inner.display(f)
1765:     fn eq(&self, other: &Path) -> bool {
1781:     fn partial_cmp(&self, other: &Path) -> Option<cmp::Ordering> {
1787:     fn cmp(&self, other: &Path) -> cmp::Ordering {
1793:     fn as_ref(&self) -> &Path {
1798: impl AsRef<Path> for OsStr {
1799:     fn as_ref(&self) -> &Path {
1800:         Path::new(self)
1804: impl AsRef<Path> for Cow<'_, OsStr> {
1805:     fn as_ref(&self) -> &Path {
1806:         Path::new(self)
1810: impl AsRef<Path> for OsString {
1811:     fn as_ref(&self) -> &Path {
1812:         Path::new(self)
1816: impl AsRef<Path> for str {
1818:     fn as_ref(&self) -> &Path {
1819:         Path::new(self)
1823: impl AsRef<Path> for String {
1824:     fn as_ref(&self) -> &Path {
1825:         Path::new(self)
1831:     fn as_ref(&self) -> &Path {
1857:                 <Path as PartialEq>::eq(self, other)
1864:                 <Path as PartialEq>::eq(self, other)
1871:                 <Path as PartialOrd>::partial_cmp(self, other)
1878:                 <Path as PartialOrd>::partial_cmp(self, other)
1884: impl_cmp!(PathBuf, Path);
1885: impl_cmp!(PathBuf, &'a Path);
1886: impl_cmp!(Cow<'a, Path>, Path);
1887: impl_cmp!(Cow<'a, Path>, &'b Path);
1888: impl_cmp!(Cow<'a, Path>, PathBuf);
1895:                 <Path as PartialEq>::eq(self, other.as_ref())
1902:                 <Path as PartialEq>::eq(self.as_ref(), other)
1909:                 <Path as PartialOrd>::partial_cmp(self, other.as_ref())
1916:                 <Path as PartialOrd>::partial_cmp(self.as_ref(), other)
1926: impl_cmp_os_str!(Path, OsStr);
1927: impl_cmp_os_str!(Path, &'a OsStr);
1928: impl_cmp_os_str!(Path, Cow<'a, OsStr>);
1929: impl_cmp_os_str!(Path, OsString);
1930: impl_cmp_os_str!(&'a Path, OsStr);
1931: impl_cmp_os_str!(&'a Path, Cow<'b, OsStr>);
1932: impl_cmp_os_str!(&'a Path, OsString);
1933: impl_cmp_os_str!(Cow<'a, Path>, OsStr);
1934: impl_cmp_os_str!(Cow<'a, Path>, &'b OsStr);
1935: impl_cmp_os_str!(Cow<'a, Path>, OsString);
21: //! and [`str`]), for working with paths abstractly. These types are thin wrappers
25: //! Paths can be parsed into [`Component`]s by iterating over the structure
29: //! [`PathBuf`]; note that the paths may differ syntactically by the
789: /// [`push`]: struct.PathBuf.html#method.push
790: /// [`set_extension`]: struct.PathBuf.html#method.set_extension
803:         unsafe { &mut *(self as *mut PathBuf as *mut Vec<u8>) }
806:     /// Allocates an empty `PathBuf`.
808:     pub fn new() -> PathBuf {
809:         PathBuf { inner: OsString::new() }
812:     /// Creates a new `PathBuf` with a given capacity used to create the
815:     pub fn with_capacity(capacity: usize) -> PathBuf {
816:         PathBuf { inner: OsString::with_capacity(capacity) }
879:     /// [`self.parent`]: struct.PathBuf.html#method.parent
901:     /// [`self.file_name`]: struct.PathBuf.html#method.file_name
903:     /// [`pop`]: struct.PathBuf.html#method.pop
925:     /// [`self.file_name`]: struct.PathBuf.html#method.file_name
926:     /// [`self.extension`]: struct.PathBuf.html#method.extension
956:     /// Consumes the `PathBuf`, yielding its internal [`OsString`] storage.
1057:     fn from(s: &T) -> PathBuf {
1058:         PathBuf::from(s.as_ref().to_os_string())
1063:     /// Converts a `OsString` into a `PathBuf`
1067:     fn from(s: OsString) -> PathBuf {
1068:         PathBuf { inner: s }
1072: impl From<PathBuf> for OsString {
1073:     /// Converts a `PathBuf` into a `OsString`
1082:     /// Converts a `String` into a `PathBuf`
1085:     fn from(s: String) -> PathBuf {
1086:         PathBuf::from(OsString::from(s))
1094:         Ok(PathBuf::from(s))
1099:     fn from_iter<I: IntoIterator<Item = P>>(iter: I) -> PathBuf {
1100:         let mut buf = PathBuf::new();
1134:         PathBuf::new()
1167:     /// Converts a `PathBuf` into an `Arc` by moving the `PathBuf` data into a new `Arc` buffer.
1185:     /// Converts a `PathBuf` into an `Rc` by moving the `PathBuf` data into a new `Rc` buffer.
1203:     type Owned = PathBuf;
1204:     fn to_owned(&self) -> PathBuf {
1207:     fn clone_into(&self, target: &mut PathBuf) {
1213:     fn eq(&self, other: &PathBuf) -> bool {
1227:     fn partial_cmp(&self, other: &PathBuf) -> Option<cmp::Ordering> {
1233:     fn cmp(&self, other: &PathBuf) -> cmp::Ordering {
1253: /// see [`PathBuf`].
1257: /// [`PathBuf`]: struct.PathBuf.html
1330:     /// [`PathBuf`]: struct.PathBuf.html
1334:         PathBuf::from(self.inner.to_os_string())
1505:     /// [`PathBuf`]: struct.PathBuf.html
1506:     /// [`PathBuf::push`]: struct.PathBuf.html#method.push
1518:     /// Creates an owned [`PathBuf`] like `self` but with the given file name.
1520:     /// See [`PathBuf::set_file_name`] for more details.
1522:     /// [`PathBuf`]: struct.PathBuf.html
1523:     /// [`PathBuf::set_file_name`]: struct.PathBuf.html#method.set_file_name
1525:     pub fn with_file_name<S: AsRef<OsStr>>(&self, file_name: S) -> PathBuf {
1529:     fn _with_file_name(&self, file_name: &OsStr) -> PathBuf {
1535:     /// Creates an owned [`PathBuf`] like `self` but with the given extension.
1537:     /// See [`PathBuf::set_extension`] for more details.
1539:     /// [`PathBuf`]: struct.PathBuf.html
1540:     /// [`PathBuf::set_extension`]: struct.PathBuf.html#method.set_extension
1542:     pub fn with_extension<S: AsRef<OsStr>>(&self, extension: S) -> PathBuf {
1546:     fn _with_extension(&self, extension: &OsStr) -> PathBuf {
1594:     /// Returns an object that implements [`Display`] for safely printing paths
1636:     pub fn canonicalize(&self) -> io::Result<PathBuf> {
1647:     pub fn read_link(&self) -> io::Result<PathBuf> {
1722:     /// [`PathBuf`]: struct.PathBuf.html
1726:         PathBuf { inner: OsString::from(inner) }
1742: /// Helper struct for safely printing paths with [`format!`] and `{}`.
1922: impl_cmp_os_str!(PathBuf, OsStr);
1923: impl_cmp_os_str!(PathBuf, &'a OsStr);
1924: impl_cmp_os_str!(PathBuf, Cow<'a, OsStr>);
1925: impl_cmp_os_str!(PathBuf, OsString);
github.com/apache/flex-sdk:frameworks/projects/spark/src/spark/primitives/Path.as: [ master, ]
64: public class Path extends FilledElement
82:     public function Path()
1196: class PathSegmentsCollection
1214: public function PathSegmentsCollection(value:String)
1540: public function generateGraphicsPath(graphicsPath:GraphicsPath,
1742: public function PathSegment(_x:Number = 0, _y:Number = 0)
39:  *  The Path class is a filled graphic element that draws a series of path segments.
40:  *  In vector graphics, a path is a series of points connected by straight or curved line segments. 
41:  *  Together the lines form an image. In Flex, you use the Path class to define a complex vector shape 
44:  *  <p>Typically, the first element of a path definition is a Move segment to specify the starting pen 
51:  *  point of the line. You can use multiple Move segments in the path definition to 
54:  *  <p>The syntax used by the Path class to define the shape is the same as the SVG path syntax, 
94:      *  Dirty flag to indicate when path data has changed. 
105:      *  path segment information  
116:      *  commands to draw this Path.  
118:      *  The data commands expressed in a Path's <code>data</code> 
140:      *  A string containing a compact represention of the path segments. This is an alternate
144:      *  <p>The value is a space-delimited string describing each path segment. Each
198:      *      <td>Close path</td>
201:      *      <td>Closes off the path.</td>
245:      *  Fill rule for intersecting or overlapping path segments. 
322:      *  Returns the bounding box for the path including stroke, if the path is resized
406:      *  @return Returns the axis aligned bounding box of the path when
420:         // then the non-stroked path bounds for the give size can be
556:         // slow code-path Player execution for all graphics in that DisplayObject.
708:      *  if the path is resized to the specified size.
947:         // Resize transformed path with the iterative solution
962:         // the path size as the size changes the angles of the joints.
1193:  *  Path segments.
1452:  *  A Vector of the actual path segments. May be empty, but always non-null. 
1510:     // If path is empty, it's untransformed bounding box is (0,0), so we return transformed point (0,0)
1522:  *  array and draws each path egment based on its control points. 
1524:  *  Segments are drawn from the x and y position of the path. 
1526:  *  applied to the path. 
1529:  *  path segment should be drawn
1532:  *  path segment should be drawn
1535:  *  this path segment 
1538:  *  path segment
1550:     // the path will begin at the previous pen location
1712:  *  The PathSegment class is the base class for a segment of a path.
1794:  *  Draws this path segment. You can determine the current pen position by 
1817:  *  path segment.
24: import flash.display.GraphicsPath;
55:  *  which makes it easy to convert SVG paths to Flex paths.</p>
112:     private var segments:PathSegmentsCollection;
115:      *  A GraphicsPath object that contains the drawing 
123:     mx_internal var graphicsPath:GraphicsPath = new GraphicsPath(new Vector.<int>(), new Vector.<Number>());
218:         segments = new PathSegmentsCollection(value);
392:     private function tangentIsValid(prevSegment:PathSegment, curSegment:PathSegment,
418:         var pathBBox:Rectangle;
424:             pathBBox = new Rectangle(naturalBounds.x * sx,
429:                 pathBBox.offset(m.tx, m.ty);
433:             pathBBox = this.segments.getBoundingBox(width, height, m);
439:             return pathBBox;
441:         // Always add half the stroke weight, even for miter limit paths,
445:         pathBBox.inflate(strokeExtents.right, strokeExtents.bottom);
447:         var seg:Vector.<PathSegment> = segments.data;
453:             return pathBBox;
473:                 var prevSegment:PathSegment = start > 0 ? seg[start - 1] : null;
482:             var startSegment:PathSegment = seg[start];
519:             var endSegment:PathSegment = seg[end];
531:                     pathBBox);
538:         return pathBBox;
582:     private function addMiterLimitStrokeToBounds(segment0:PathSegment,
583:                                                  segment1:PathSegment,
584:                                                  segment2:PathSegment,
939:         // We have special handling for miter-limit stroked non-transformed paths,
1098:                 segments.generateGraphicsPath(graphicsPath, drawX, drawY, sx, sy);
1102:         g.drawPath(graphicsPath.commands, graphicsPath.data, winding);
1187: //  Internal Helper Class - PathSegmentsCollection
1194:  *  Provides methods for generating GraphicsPath and calculating bounds. 
1218:         _segments = new Vector.<PathSegment>();
1222:     var newSegments:Vector.<PathSegment> = new Vector.<PathSegment>();
1418:                 _segments = new Vector.<PathSegment>();
1449: private var _segments:Vector.<PathSegment>;
1454: public function get data():Vector.<PathSegment>
1499:     var prevSegment:PathSegment;
1500:     var pathBBox:Rectangle;
1505:         var segment:PathSegment = _segments[i];
1506:         pathBBox = segment.getBoundingBox(prevSegment, sx, sy, m, pathBBox);
1511:     if (!pathBBox)
1515:         pathBBox = new Rectangle(x, y);
1517:     return pathBBox;
1546:     graphicsPath.commands = null;
1547:     graphicsPath.data = null;
1552:     graphicsPath.moveTo(tx, ty);
1554:     var curSegment:PathSegment;
1555:     var prevSegment:PathSegment;
1561:         curSegment.draw(graphicsPath, tx, ty, sx, sy, prevSegment);
1702: //  Internal Helper Class - PathSegment 
1705: import flash.display.GraphicsPath;
1721: class PathSegment extends Object
1805: public function draw(graphicsPath:GraphicsPath, dx:Number,dy:Number,sx:Number,sy:Number,prev:PathSegment):void
1824: public function getBoundingBox(prev:PathSegment, sx:Number, sy:Number, m:Matrix, rect:Rectangle):Rectangle
1839: public function getTangent(prev:PathSegment, start:Boolean, sx:Number, sy:Number, m:Matrix, result:Point):void
1853: import flash.display.GraphicsPath;
1869: class LineSegment extends PathSegment
1911: override public function draw(graphicsPath:GraphicsPath, dx:Number,dy:Number,sx:Number,sy:Number,prev:PathSegment):void
1913:     graphicsPath.lineTo(dx + x*sx, dy + y*sy);
1924: override public function getBoundingBox(prev:PathSegment, sx:Number, sy:Number, m:Matrix, rect:Rectangle):Rectangle
1952: override public function getTangent(prev:PathSegment, start:Boolean, sx:Number, sy:Number, m:Matrix, result:Point):void
1967: import flash.display.GraphicsPath;
1981: class MoveSegment extends PathSegment
2024: override public function draw(graphicsPath:GraphicsPath, dx:Number,dy:Number,sx:Number,sy:Number,prev:PathSegment):void
2026:     graphicsPath.moveTo(dx+x*sx, dy+y*sy);
2036: import flash.display.GraphicsPath;
2061: class CubicBezierSegment extends PathSegment
2198:     override public function draw(graphicsPath:GraphicsPath, dx:Number, dy:Number, sx:Number, sy:Number, prev:PathSegment):void
2202:         graphicsPath.curveTo(dx + qPts.control1.x*sx, dy+qPts.control1.y*sy, dx+qPts.anchor1.x*sx, dy+qPts.anchor1.y*sy)...(1 bytes skipped)...
2203:         graphicsPath.curveTo(dx + qPts.control2.x*sx, dy+qPts.control2.y*sy, dx+qPts.anchor2.x*sx, dy+qPts.anchor2.y*sy)...(1 bytes skipped)...
2204:         graphicsPath.curveTo(dx + qPts.control3.x*sx, dy+qPts.control3.y*sy, dx+qPts.anchor3.x*sx, dy+qPts.anchor3.y*sy)...(1 bytes skipped)...
2205:         graphicsPath.curveTo(dx + qPts.control4.x*sx, dy+qPts.control4.y*sy, dx+qPts.anchor4.x*sx, dy+qPts.anchor4.y*sy)...(1 bytes skipped)...
2216:     override public function getBoundingBox(prev:PathSegment, sx:Number, sy:Number,
2252:     override public function getTangent(prev:PathSegment, start:Boolean, sx:Number, sy:Number, m:Matrix, result:Point):void
2318:     private function getQuadraticPoints(prev:PathSegment):QuadraticPoints
2411: import flash.display.GraphicsPath;
2431: class QuadraticBezierSegment extends PathSegment
2526:     override public function draw(graphicsPath:GraphicsPath, dx:Number,dy:Number,sx:Number,sy:Number,prev:PathSegment):void
2528:         graphicsPath.curveTo(dx+control1X*sx, dy+control1Y*sy, dx+x*sx, dy+y*sy);
2574:     override public function getTangent(prev:PathSegment, start:Boolean, sx:Number, sy:Number, m:Matrix, result:Point):void
2591:     override public function getBoundingBox(prev:PathSegment, sx:Number, sy:Number,
101:     private var graphicsPathChanged:Boolean = true;
220:         graphicsPathChanged = true;
246:      *  Possible values are <code>GraphicsPathWinding.EVEN_ODD</code> or <code>GraphicsPathWinding.NON_ZERO</code>.
250:      *  @see flash.display.GraphicsPathWinding 
262:             graphicsPathChanged = true;
1085:             graphicsPathChanged = true;
1092:         if (graphicsPathChanged)
1099:             graphicsPathChanged = false;
1139:         graphicsPathChanged = true;
github.com/GNOME/gimp:tools/gimppath2svg.py: [ mainline, ]
43: class Path:
114: path = Path()
30: <path id="%s" transform="translate (%d,%d)"
55:             path.name = namematch.group(1)
59:                path.gimppoints.append ([])
61:             path.gimppoints[-1].append (map (int, pointmatch.groups()))
71:       for path in self.gimppoints:
72:          if path:
73:             start = path[0]
75:             path = path[1:]
76:             while path:
77:                curve = path [0:3]
78:                path = path[3:]
115: path.readgimpfile (infile)
116: path.makesvg()
117: path.writesvgfile (outfile)
6: gimppath2svg.py -- Converts Gimp-Paths to a SVG-File.
23: Usage: gimppath2svg.py [infile [outfile]]
46:       self.svgpath = ""
89:             self.svgpath = self.svgpath + svg
92:       if self.svgpath:
97:                               self.svgpath)
android.googlesource.com/platform/external/python/parse_type:tasks/_vendor/path.py: [ master, ]
176: class Path(text_type):
1717: class path(Path):
294:     def abspath(self):
302:     def normpath(self):
306:     def realpath(self):
383:     def splitpath(self):
441:     def joinpath(cls, first, *others):
475:     def relpath(self, start='.'):
1141:         def pathconf(self, name):
482:     def relpathto(self, dest):
2: # SOURCE: https://pypi.python.org/pypi/path.py
27: path.py - An object representing a path to a file or directory.
29: https://github.com/jaraco/path.py
33:     from path import Path
34:     d = Path('/home/guido/bin')
113: __all__ = ['Path', 'CaseInsensitivePattern']
126:     __version__ = pkg_resources.require('path.py')[0].version
143:     Save results for the :meth:'path.using_module' classmethod.
178:     Represents a filesystem path.
181:     counterparts in :mod:`os.path`.
185:     such that they will be bound to the Path instance. For example,
186:     ``Path(src).copy(target)`` is equivalent to
189:     the Path instance.
192:     module = os.path
193:     """ The path module to use for path operations.
195:     .. seealso:: :mod:`os.path`
200:             raise TypeError("Invalid initial value for path: None")
221:     def _always_unicode(cls, path):
223:         Ensure the path as retrieved from a Python API, such as :func:`os.listdir`,
226:         if PY3 or isinstance(path, text_type):
227:             return path
228:         return path.decode(sys.getfilesystemencoding(), 'surrogateescape')
233:         return '%s(%s)' % (type(self).__name__, super(Path, self).__repr__())
235:     # Adding a Path and a string yields a Path.
238:             return self._next_class(super(Path, self).__add__(more))
251:         Join two path components, adding a separator character if
254:         .. seealso:: :func:`os.path.join`
265:         Join two path components, adding a separator character if
268:         .. seealso:: :func:`os.path.join`
285:         """ Return the current working directory as a path object.
292:     # --- Operations on Path strings.
295:         """ .. seealso:: :func:`os.path.abspath` """
299:         """ .. seealso:: :func:`os.path.normcase` """
303:         """ .. seealso:: :func:`os.path.normpath` """
307:         """ .. seealso:: :func:`os.path.realpath` """
311:         """ .. seealso:: :func:`os.path.expanduser` """
315:         """ .. seealso:: :func:`os.path.expandvars` """
319:         """ .. seealso:: :attr:`parent`, :func:`os.path.dirname` """
323:         """ .. seealso:: :attr:`name`, :func:`os.path.basename` """
340:         ``Path('/home/guido/python.tar.gz').name == 'python.tar.gz'``,
342:         ``Path('/home/guido/python.tar.gz').namebase == 'python.tar'``.
364:         """ This path's parent directory, as a new Path object.
367:         ``Path('/usr/local/lib/libpython.so').parent ==
368:         Path('/usr/local/lib')``
370:         .. seealso:: :meth:`dirname`, :func:`os.path.dirname`
375:         """ The name of this file or directory without the full path.
378:         ``Path('/usr/local/lib/libpython.so').name == 'libpython.so'``
380:         .. seealso:: :meth:`basename`, :func:`os.path.basename`
386:         .. seealso:: :attr:`parent`, :attr:`name`, :func:`os.path.split`
394:         Split the drive specifier from this path.  If there is
396:         is simply ``(Path(''), p)``.  This is always the case on Unix.
398:         .. seealso:: :func:`os.path.splitdrive`
406:         Split the filename extension from this path and return
410:         last path segment.  This has the property that if
413:         .. seealso:: :func:`os.path.splitext`
419:         """ p.stripext() -> Remove one file extension from the path.
421:         For example, ``Path('/home/guido/python.tar.gz').stripext()``
422:         returns ``Path('/home/guido/python.tar')``.
427:         """ .. seealso:: :func:`os.path.splitunc` """
434:         The UNC mount point for this path.
443:         Join first to zero or more :class:`Path` components, adding a separator
447:         .. seealso:: :func:`os.path.join`
454:         r""" Return a list of the path components in this path.
456:         The first item in the list will be a Path.  Its value will be
458:         directory of this path (for example, ``'/'`` or ``'C:\\'``).  The
461:         ``path.Path.joinpath(*result)`` will yield the original path.
476:         """ Return this path as a relative path,
483:         """ Return a relative path from `self` to `dest`.
485:         If there is no relative path from `self` to `dest`, for example if
528:         The elements of the list are Path objects.
546:         The elements of the list are Path objects.
559:         The elements of the list are Path objects.
572:         The iterator yields Path objects naming each child item of
713:             attribute, it is applied to the name and path prior to comparison.
717:             to :meth:`os.path.normcase`.
728:         """ Return a list of Path objects that match the pattern.
730:         `pattern` - a path relative to this directory, with wildcards.
732:         For example, ``Path('/users').glob('*/bin/*')`` returns a list
766:                >>> for chunk in Path("path.py").chunks(8192, mode='rb'):
902:         By default this overwrites any existing file at this path.
956:         """ Returns a hash object for the file at the current path.
987:     # N.B. On some platforms, the os.path functions may be implemented in C
992:         """ .. seealso:: :func:`os.path.isabs` """
996:         """ .. seealso:: :func:`os.path.exists` """
1000:         """ .. seealso:: :func:`os.path.isdir` """
1004:         """ .. seealso:: :func:`os.path.isfile` """
1008:         """ .. seealso:: :func:`os.path.islink` """
1012:         """ .. seealso:: :func:`os.path.ismount` """
1016:         """ .. seealso:: :func:`os.path.samefile` """
1018:             other = Path(other).realpath().normpath().normcase()
1023:         """ .. seealso:: :attr:`atime`, :func:`os.path.getatime` """
1030:         .. seealso:: :meth:`getatime`, :func:`os.path.getatime`
1034:         """ .. seealso:: :attr:`mtime`, :func:`os.path.getmtime` """
1041:         .. seealso:: :meth:`getmtime`, :func:`os.path.getmtime`
1045:         """ .. seealso:: :attr:`ctime`, :func:`os.path.getctime` """
1052:         .. seealso:: :meth:`getctime`, :func:`os.path.getctime`
1056:         """ .. seealso:: :attr:`size`, :func:`os.path.getsize` """
1063:         .. seealso:: :meth:`getsize`, :func:`os.path.getsize`
1068:             """ Return ``True`` if current user has access to this path.
1078:         """ Perform a ``stat()`` system call on this path.
1134:             """ Perform a ``statvfs()`` system call on this path.
1322:             """ Return the path to which this symbolic link points.
1324:             The result may be an absolute or a relative path.
1331:             """ Return the path to which this symbolic link points.
1333:             The result is always an absolute path.
1345:     # Path(name).copy(target) will invoke shutil.copy(name, target)
1432:             p = Path(filename)
1506:             dir = Path.special().user.config
1514:             dir = Path.special("My App").user.config.makedirs_p()
1531:     def __init__(self, path_class, *args, **kwargs):
1539:             path_class=path_class,
1549:         result wrapped in self.path_class
1553:         MultiPath = Multi.for_class(self.path_class)
1559:     A mix-in for a Path which may contain multiple Path separated by pathsep.
1562:     def for_class(cls, path_cls):
1563:         name = 'Multi' + path_cls.__name__
1566:         return type(name, (cls, path_cls), {})
1590: class tempdir(Path):
1598:             # do stuff with the Path object "d"
1608:         return Path
1707:         from path import Path, CaseInsensitivePattern as ci
1708:         Path('.').files(ci('*.py'))
1719:         msg = "path is deprecated. Use Path instead."
1721:         return Path.__new__(cls, *args, **kwargs)
1724: __all__ += ['path']
247:     # The / operator joins Paths.
249:         """ fp.__div__(rel) == fp / rel == fp.joinpath(rel)
261:     # The / operator joins Paths the other way around
296:         return self._next_class(self.module.abspath(self))
304:         return self._next_class(self.module.normpath(self))
308:         return self._next_class(self.module.realpath(self))
328:         :meth:`expanduser()`, and :meth:`normpath()` on it.
333:         return self.expandvars().expanduser().normpath()
384:         """ p.splitpath() -> Return ``(p.parent, p.name)``.
435:         This is empty for paths on local drives.
467:             loc, child = prev.splitpath()
487:         ``dest.abspath()``.
489:         origin = self.abspath()
490:         dest = self._next_class(dest).abspath()
500:         # Find the location where the two paths start to differ.
507:         # Now i is the point where the two paths diverge.
515:             relpath = os.curdir
517:             relpath = self.module.join(*segments)
518:         return self._next_class(relpath)
1019:             return self.realpath().normpath().normcase() == other
1140:     if hasattr(os, 'pathconf'):
1142:             """ .. seealso:: :func:`os.pathconf` """
1143:             return os.pathconf(self, name)
1303:         def link(self, newpath):
1304:             """ Create a hard link at `newpath`, pointing to this file.
1308:             os.link(self, newpath)
1309:             return self._next_class(newpath)
1341:                 return (self.parent / p).abspath()
1510:         the paths in a platform-friendly way.
1524:         def __init__(self, paths, scope):
1525:             self.paths = paths
1529:             return self.paths.get_dir(self.scope, class_)
1554:         return MultiPath.detect(value)
1570:         if os.pathsep not in input:
1575:         return iter(map(self._next_class, self.split(os.pathsep)))
1713:         return __import__('ntpath').normcase
480:         return cwd.relpathto(self)
chromium.googlesource.com/infra/third_party/virtualenv:src/virtualenv/util/path/_pathlib/via_os_path.py: [ master, ]
12: class Path(object):
13:     def __init__(self, path):
14:         if isinstance(path, Path):
15:             _path = path._path
17:             _path = ensure_text(path)
19:                 _path = _path.encode("utf-8")
20:         self._path = _path
23:         return ensure_str("Path({})".format(ensure_text(self._path)))
26:         return ensure_text(self._path)
29:         return ensure_str(self._path)
32:         if isinstance(other, Path):
33:             right = other._path
38:         return Path(os.path.join(self._path, right))
44:         return self._path == (other._path if isinstance(other, Path) else None)
50:         return hash(self._path)
53:         return os.path.exists(self._path)
57:         return Path(os.path.abspath(os.path.join(self._path, os.path.pardir)))
60:         return Path(os.path.realpath(self._path))
64:         return os.path.basename(self._path)
68:         return self._path.split(os.sep)
71:         return os.path.isfile(self._path)
74:         return os.path.isdir(self._path)
78:             os.makedirs(self._path)
87:         with open(self._path, "rb") as file_handler:
91:         with open(self._path, "wb") as file_handler:
98:         for p in os.listdir(self._path):
99:             yield Path(os.path.join(self._path, p))
103:         _, ext = os.path.splitext(self.name)
108:         base, _ = os.path.splitext(self.name)
113:         with open(self._path, mode) as file_handler:
121:             result.append(Path(os.sep.join(parts[0 : i + 1])))
125:         os.remove(self._path)
131:         return os.path.islink(self._path)
134:         if not self._path.startswith(other._path):
135:             raise ValueError("{} does not start with {}".format(self._path, other._path))
136:         return Path(os.sep.join(self.parts[len(other.parts) :]))
139:         return os.stat(self._path)
142:         os.chmod(self._path, mode)
145:         return Path(os.path.abspath(self._path))
148: __all__ = ("Path",)
github.com/google/go-cmp:cmp/path.go: [ master, ]
26: type Path []PathStep
34: type PathStep interface {
151: type pathStep struct {
172: 	pathStep
211: 	pathStep
256: 	pathStep
270: 	pathStep
280: 	pathStep
290: 	pathStep
335: type pointerPath struct {
17: // Path is a list of PathSteps describing the sequence of operations to get
19: // The first Path element is always an operation-less PathStep that exists
37: 	// Type is the resulting type after performing the path step.
40: 	// Values is the resulting values after performing the path step.
65: func (pa *Path) push(s PathStep) {
69: func (pa *Path) pop() {
73: // Last returns the last PathStep in the Path.
74: // If the path is empty, this returns a non-nil PathStep that reports a nil Type.
75: func (pa Path) Last() PathStep {
79: // Index returns the ith step in the Path and supports negative indexing.
80: // A negative index starts counting from the tail of the Path such that -1
83: func (pa Path) Index(i int) PathStep {
93: // String returns the simplified path to a node.
94: // The simplified path only contains struct field accesses.
98: func (pa Path) String() string {
108: // GoString returns the path to a specific node using Go syntax.
112: func (pa Path) GoString() string {
329: // Path for whether px was ever encountered in the Path history of x, and
334: // in O(1) instead of O(N) where N is len(Path).
28: // PathStep is a union-type for specific operations to traverse
57: 	_ PathStep = StructField{}
58: 	_ PathStep = SliceIndex{}
59: 	_ PathStep = MapIndex{}
60: 	_ PathStep = Indirect{}
61: 	_ PathStep = TypeAssertion{}
62: 	_ PathStep = Transform{}
82: // If index is invalid, this returns a non-nil PathStep that reports a nil Type.
88: 		return pathStep{}
116: 		var nextStep PathStep
156: func (ps pathStep) Type() reflect.Type             { return ps.typ }
157: func (ps pathStep) Values() (vx, vy reflect.Value) { return ps.vx, ps.vy }
158: func (ps pathStep) String() string {
308: // pointerPath represents a dual-stack of pointers encountered when
313: // The pointerPath uses a map to represent a stack; where descension into a
331: // equal if both px and py have a cycle resulting from the same PathStep.
342: func (p *pointerPath) Init() {
354: func (p pointerPath) Push(vx, vy reflect.Value) (equal, visited bool) {
369: func (p pointerPath) Pop(vx, vy reflect.Value) {
android.googlesource.com/platform/external/go-cmp:cmp/path.go: [ master, ]
26: type Path []PathStep
34: type PathStep interface {
151: type pathStep struct {
172: 	pathStep
211: 	pathStep
256: 	pathStep
270: 	pathStep
280: 	pathStep
290: 	pathStep
335: type pointerPath struct {
17: // Path is a list of PathSteps describing the sequence of operations to get
19: // The first Path element is always an operation-less PathStep that exists
37: 	// Type is the resulting type after performing the path step.
40: 	// Values is the resulting values after performing the path step.
65: func (pa *Path) push(s PathStep) {
69: func (pa *Path) pop() {
73: // Last returns the last PathStep in the Path.
74: // If the path is empty, this returns a non-nil PathStep that reports a nil Type.
75: func (pa Path) Last() PathStep {
79: // Index returns the ith step in the Path and supports negative indexing.
80: // A negative index starts counting from the tail of the Path such that -1
83: func (pa Path) Index(i int) PathStep {
93: // String returns the simplified path to a node.
94: // The simplified path only contains struct field accesses.
98: func (pa Path) String() string {
108: // GoString returns the path to a specific node using Go syntax.
112: func (pa Path) GoString() string {
329: // Path for whether px was ever encountered in the Path history of x, and
334: // in O(1) instead of O(N) where N is len(Path).
28: // PathStep is a union-type for specific operations to traverse
57: 	_ PathStep = StructField{}
58: 	_ PathStep = SliceIndex{}
59: 	_ PathStep = MapIndex{}
60: 	_ PathStep = Indirect{}
61: 	_ PathStep = TypeAssertion{}
62: 	_ PathStep = Transform{}
82: // If index is invalid, this returns a non-nil PathStep that reports a nil Type.
88: 		return pathStep{}
116: 		var nextStep PathStep
156: func (ps pathStep) Type() reflect.Type             { return ps.typ }
157: func (ps pathStep) Values() (vx, vy reflect.Value) { return ps.vx, ps.vy }
158: func (ps pathStep) String() string {
308: // pointerPath represents a dual-stack of pointers encountered when
313: // The pointerPath uses a map to represent a stack; where descension into a
331: // equal if both px and py have a cycle resulting from the same PathStep.
342: func (p *pointerPath) Init() {
354: func (p pointerPath) Push(vx, vy reflect.Value) (equal, visited bool) {
369: func (p pointerPath) Pop(vx, vy reflect.Value) {
android.googlesource.com/platform/tools/gpu:service/path/path_binary.go: [ master, ]
6: package path
76: 		o.Array = obj.(Path)
113: 	Package: "path",
116: 		{Declared: "Array", Type: &schema.Interface{Name: "Path"}},
163: 	Package: "path",
218: 	Package: "path",
284: 	Package: "path",
334: 	Package: "path",
383: 	Package: "path",
412: 		o.Struct = obj.(Path)
449: 	Package: "path",
452: 		{Declared: "Struct", Type: &schema.Interface{Name: "Path"}},
505: 	Package: "path",
554: 	Package: "path",
592: 		o.Map = obj.(Path)
633: 	Package: "path",
636: 		{Declared: "Map", Type: &schema.Interface{Name: "Path"}},
722: 	Package: "path",
780: 	Package: "path",
812: 		o.Array = obj.(Path)
857: 	Package: "path",
860: 		{Declared: "Array", Type: &schema.Interface{Name: "Path"}},
914: 	Package: "path",
963: 	Package: "path",
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/third_party/blink/web_tests/paint/invalidation/clip/clip-path-in-mask-layer.html: [ master, ]
5:     <path id="path" d="M0 0 L1 1 L0 1 Z"/>
8: <div style="width: 200px; height: 200px; background: blue; clip-path: url(#clip); will-change: transform"></div>
11:   path.setAttribute('d', 'M0 0 L1 0 L1 1 L0 1 Z');
4: 	<clipPath id="clip" clipPathUnits='objectBoundingBox'>
6: 	</clipPath>
github.com/yeoman/doctor:lib/rules/node-path.js: [ master, ]
3: const path = require('path');
14:   pathMismatch(npmRoot) {
29: function fixPath(filepath) {
48:   const nodePaths = (process.env.NODE_PATH || '').split(path.delimiter).map(fixPath);
7: exports.description = 'NODE_PATH matches the npm root';
11:     return message.get('node-path-npm-failure', {});
15:     let msgPath = 'node-path-path-mismatch';
22:       path: process.env.NODE_PATH,
30:   let fixedPath = path.resolve(path.normalize(filepath.trim()));
44:   if (process.env.NODE_PATH === undefined) {
18:       msgPath += '-windows';
21:     return message.get(msgPath, {
33:     fixedPath = fs.realpathSync(fixedPath);
40:   return fixedPath;
52:     const npmRoot = fixPath(stdout);
55:       return errors.pathMismatch(npmRoot);
54:     if (nodePaths.indexOf(npmRoot) < 0) {
github.com/apache/flex-whiteboard:cframpton/adobe.next/frameworks/projects/spark/src/spark/primitives/Path.as: [ trunk, ] Duplicate result
github.com/apache/flex-whiteboard:espenskogen/frameworks/projects/spark/src/spark/primitives/Path.as: [ trunk, ] Duplicate result
android.googlesource.com/platform/external/go-etree:path.go: [ master, ]
84: type Path struct {
89: type ErrPath string
98: func CompilePath(path string) (Path, error) {
111: func MustCompilePath(path string) Path {
148: type pather struct {
211: func (c *compiler) parsePath(path string) []segment {
235: func splitPath(path string) []string {
163: func newPather() *pather {
13: A Path is a string that represents a search path through an etree starting
17: A Path consists of a series of slash-separated "selectors", each of which may
22: Although etree Path strings are structurally and behaviorally similar to XPath
31:     /               Select the root element when used at the start of a path.
54: Below are some examples of etree path strings.
88: // ErrPath is returned by path functions when an invalid etree path is provided.
91: // Error returns the string describing a path error.
100: 	segments := comp.parsePath(path)
102: 		return Path{nil}, comp.err
104: 	return Path{segments}, nil
109: // occurs.  Use this function to create Paths when you know the path is
112: 	p, err := CompilePath(path)
119: // A segment is a portion of a path between "/" characters.
134: // path traversal.
140: // on a path filter in [brackets].
146: // a Path object.  It collects and deduplicates all elements matching
147: // the path query.
156: // A node represents an element and the remaining path segments that
172: // traverse follows the path from the element e, collecting
173: // and then returning all elements that match the path's selectors
175: func (p *pather) traverse(e *Element, path Path) []*Element {
176: 	for p.queue.add(node{e, path.segments}); p.queue.len() > 0; {
182: // eval evalutes the current path node by applying the remaining
183: // path's selector rules against the node's element.
203: // A compiler generates a compiled path from a path string.
208: // parsePath parses an XPath-like string describing a path
212: 	// If path ends with //, fix it
213: 	if strings.HasSuffix(path, "//") {
214: 		path += "*"
219: 	// Check for an absolute path
220: 	if strings.HasPrefix(path, "/") {
222: 		path = path[1:]
225: 	// Split path into segments
226: 	for _, s := range splitPath(path) {
239: 	for i := 0; i+1 <= len(path); i++ {
240: 		if path[i] == '\'' {
242: 		} else if path[i] == '/' && !inquote {
243: 			pieces = append(pieces, path[start:i])
247: 	return append(pieces, path[start:])
250: // parseSegment parses a path segment between / characters.
251: func (c *compiler) parseSegment(path string) segment {
252: 	pieces := strings.Split(path, "[")
260: 			c.err = ErrPath("path has invalid filter [brackets].")
268: // parseSelector parses a selector at the start of a path segment.
269: func (c *compiler) parseSelector(path string) selector {
270: 	switch path {
280: 		return newSelectChildrenByTag(path)
292: // parseFilter parses a path filter contained within [brackets].
293: func (c *compiler) parseFilter(path string) filter {
294: 	if len(path) == 0 {
295: 		c.err = ErrPath("path contains an empty filter expression.")
300: 	eqindex := strings.Index(path, "='")
302: 		rindex := nextIndex(path, "'", eqindex+2)
303: 		if rindex != len(path)-1 {
304: 			c.err = ErrPath("path has mismatched filter quotes.")
308: 		key := path[:eqindex]
309: 		value := path[eqindex+2 : rindex]
319: 			c.err = ErrPath("path has unknown function " + name)
328: 	case path[0] == '@':
329: 		return newFilterAttr(path[1:])
330: 	case strings.HasSuffix(path, "()"):
331: 		name := path[:len(path)-2]
335: 		c.err = ErrPath("path has unknown function " + name)
337: 	case isInteger(path):
338: 		pos, _ := strconv.Atoi(path)
346: 		return newFilterChild(path)
412: func newSelectChildrenByTag(path string) *selectChildrenByTag {
413: 	s, l := spaceDecompose(path)
14: from the document root or an arbitrary element. Paths are used with the
23: strings (https://www.w3.org/TR/1999/REC-xpath-19991116/), they have a more
26: The following selectors are supported by etree paths:
92: func (err ErrPath) Error() string {
96: // CompilePath creates an optimized version of an XPath-like string that
101: 	if comp.err != ErrPath("") {
107: // MustCompilePath creates an optimized version of an XPath-like string that
126: func (seg *segment) apply(e *Element, p *pather) {
136: 	apply(e *Element, p *pather)
142: 	apply(p *pather)
145: // A pather is helper object that traverses an element tree using
157: // should be applied against it by the pather.
164: 	return &pather{
184: func (p *pather) eval(n node) {
205: 	err ErrPath
228: 		if c.err != ErrPath("") {
258: 		fpath := pieces[i]
259: 		if fpath[len(fpath)-1] != ']' {
263: 		seg.filters = append(seg.filters, c.parseFilter(fpath[:len(fpath)-1]))
353: func (s *selectSelf) apply(e *Element, p *pather) {
360: func (s *selectRoot) apply(e *Element, p *pather) {
371: func (s *selectParent) apply(e *Element, p *pather) {
381: func (s *selectChildren) apply(e *Element, p *pather) {
393: func (s *selectDescendants) apply(e *Element, p *pather) {
417: func (s *selectChildrenByTag) apply(e *Element, p *pather) {
435: func (f *filterPos) apply(p *pather) {
459: func (f *filterAttr) apply(p *pather) {
482: func (f *filterAttrVal) apply(p *pather) {
504: func (f *filterFunc) apply(p *pather) {
524: func (f *filterFuncVal) apply(p *pather) {
544: func (f *filterChild) apply(p *pather) {
568: func (f *filterChildText) apply(p *pather) {
github.com/sourcegraph/srclib-javascript:lib/define-path-info.js: [ master, ]
3: var path = require("path");
453:                 path: scope,
522:                 path: "",
62: function resolveScopeCountPath(scope) {
142: var pathVisitor = walk.make({
557: module.exports.mapLinesPathToScopePath = function(ternServer, defInfo) {
607: module.exports.getPath = function(node) {
47: function getFilePathName(fileName) {
19:  * @property {string} scope - scope path
28:  * @property {string} path - path to class
36:  * @return {string} path to given node in given file
100:  * required parent properties and adjusting path
102:  * @param {string} scope new scope (path)
316:             if (def && def.path) {
317:                 pathMap[formPathForScope(fileName, node.object)] = def.path;
318:                 newScope = def.path;
326:                 if (def && def.path) {
327:                     pathMap[formPathForScope(fileName, node.object)] = def.path;
328:                     newScope = def.path;
341:                     newScope = util.formPath(def.path, "fn", '+' + node.property.name);
344:                     newScope = util.formPath(def.path, "fn", '-' + node.property.name);
347:                     newScope = util.formPath(def.path, "fn", node.property.name);
350:                     newScope = util.formPath(classDefinitions[currentClass].path, "prop", node.property.name);
438:             // append /class/NAME to path being built
443:                 classDefinitions[currentClass].path = scope;
605:  * @returns {string} computed path to given node
39:     return util.formPath(fileName, data.start, data.end);
48:     fileName = util.normalizePath(fileName);
69:         return util.formPath(scope, scopeCountRes);
73: module.exports.pathMap = pathMap = {};
154:             var newScope = util.formPath(scopeInfo.scope, "obj_def_prop");
158:                 newScope = util.formPath(newScope, obj.name);
160:                 newScope = util.formPath(newScope, property.value);
164:             pathMap[key] = resolveScopeCountPath(newScope);
179:         var newScope = util.formPath(scopeInfo.scope, "import");
185:                     newScope = resolveScopeCountPath(util.formPath(newScope, id.name));
186:                     pathMap[key] = newScope;
204:         var newScope = util.formPath(scopeInfo.scope, "fn");
223:             newScope = resolveScopeCountPath(util.formPath(newScope, name));
224:             pathMap[formPathForScope(fileName, identNode)] = newScope;
228:             newScope = resolveScopeCountPath(newScope);
240:             var paramScope = resolveScopeCountPath(util.formPath(newScope, "param", param.name));
241:             pathMap[formPathForScope(fileName, param)] = paramScope;
267:                 var newScope = resolveScopeCountPath(util.formPath(scopeInfo.scope, "var", decl.name));
268:                 pathMap[key] = newScope;
309:             newScope = resolveScopeCountPath(util.formPath(scopeInfo.scope, "obj", node.object.name));
310:             pathMap[formPathForScope(fileName, node.object)] = newScope;
353:                 newScope = resolveScopeCountPath(util.formPath(newScope, "prop", node.property.name));
356:             pathMap[keyProp] = newScope;
371:         var newScope = util.formPath(scopeInfo.scope, "obj");
375:                 objScope = util.formPath(objScope, "objType", node.objType.name);
378:             var keyScope = util.formPath(objScope, "obj_key");
382:                 keyScope = resolveScopeCountPath(util.formPath(keyScope, node.properties[i].key.name));
383:                 pathMap[keyKey] = keyScope;
387:                 keyScope = resolveScopeCountPath(util.formPath(keyScope, node.properties[i].key.value));
388:                 pathMap[keyKey] = keyScope;
395:                 valScope = resolveScopeCountPath(util.formPath(valScope, "obj_val", node.properties[i].value.name));
396:                 pathMap[key_val] = valScope;
436:         var scope = util.formPath(scopeInfo.scope, "class");
439:             scope = resolveScopeCountPath(util.formPath(scope, node.id.name));
440:             pathMap[formPathForScope(node.sourceFile.name, node.id)] = scope;
446:             scope = resolveScopeCountPath(scope);
457:             pathMap[util.formPath(node.sourceFile.name, node.start, node.start + "class".length)] = scope;
513:     var visitor = extend({}, pathVisitor);
530:         pathVisitor.ClassDeclaration(node, state, cb);
543:         pathVisitor.MethodDefinition(node, state, cb);
562:     var mapRes = pathMap[key];
577:                     methods: pathVisitor
578:                 }, null, pathVisitor);
608:     return pathMap[formPathForScope(node.sourceFile.name, node)];
38: module.exports.formPathForScope = formPathForScope = function(fileName, data) {
163:             var key = formPathForScope(fileName, property);
184:                     var key = formPathForScope(fileName, id);
266:                 var key = formPathForScope(fileName, decl);
355:             keyProp = formPathForScope(fileName, node.property);
381:                 keyKey = formPathForScope(fileName, node.properties[i].key);
386:                 keyKey = formPathForScope(fileName, node.properties[i].key);
394:                 var key_val = formPathForScope(fileName, node.properties[i].value);
508: module.exports.initLocalFilesScopePaths = function(ternServer, localFiles) {
550:                 scope: getFilePathName(file.name),
558:     var key = formPathForScope(defInfo.file, {
575:                     scope: getFilePathName(file.name),
android.googlesource.com/platform/external/perf_data_converter:src/quipper/scoped_temp_path.h: [ master, ]
22:   const string& path() const { return path_; }
25:   string path_;
17: class ScopedTempPath {
19:   ScopedTempPath() {}
6: #define CHROMIUMOS_WIDE_PROFILING_SCOPED_TEMP_PATH_H_
5: #ifndef CHROMIUMOS_WIDE_PROFILING_SCOPED_TEMP_PATH_H_
20:   // The temporary path will be removed when the object is destroyed.
33:   // Create a temporary file.  If successful, the path will be stored in
34:   // |path_|.  If not, |path_| will be an empty string.
43:   // Create a temporary directory.  If successful, the path will be stored in
44:   // |path_|.  If not, |path_| will be an empty string.
53: #endif  // CHROMIUMOS_WIDE_PROFILING_SCOPED_TEMP_PATH_H_
21:   virtual ~ScopedTempPath();
28:   DISALLOW_COPY_AND_ASSIGN(ScopedTempPath);
31: class ScopedTempFile : public ScopedTempPath {
41: class ScopedTempDir : public ScopedTempPath {
github.com/google/capture-thread:example/paths.cc: [ current, ]
60: class Path : public ThreadCapture<Path> {
56:   std::ostringstream path_;
34: class PathBuilder {
85:   static std::string DelegateRootPath(const Path& path) {
89:   static void DelegateLocalPath(const Path& path, PathBuilder* builder) {
95: class InRootPath : public Path {
97:   InRootPath(const std::string& root_path)
101:   std::string RootPath() const override { return root_path_; }
103:   void AppendLocalPath(PathBuilder* builder) const override {
116: class InLocalPath : public Path {
118:   InLocalPath(const std::string& local_path)
122:   std::string RootPath() const override {
127:   void AppendLocalPath(PathBuilder* builder) const override {
111:   const std::string root_path_;
137:   const std::string local_path_;
36:   std::string String() const { return path_.str(); }
41:         path_.str("");
42:         path_ << component;
45:           path_ << '/';
47:         path_ << component;
86:     return path.RootPath();
90:     path.AppendLocalPath(builder);
94: // Sets the root path, which persists while the instance is in scope.
98:       : root_path_(root_path), capture_to_(this) {}
115: // Sets the local path relative to the current root + local path.
119:       : local_path_(local_path), capture_to_(this) {}
133:     builder->Add(local_path_);
143:   InLocalPath path("bin");
146:     std::cerr << "Installing binary " << Path::Working() << std::endl;
152:   InLocalPath path("lib");
155:     std::cerr << "Installing library " << Path::Working() << std::endl;
160: void InstallProjectIn(const std::string& path) {
161:   InRootPath root(path);
162:   std::cerr << "Installing project in " << Path::Root() << std::endl;
33: // A helper class for building paths from components.
38:   PathBuilder& Add(const std::string& component) {
59: // Tracks persistent root and local paths.
64:       return GetCurrent()->RootPath();
72:       PathBuilder builder;
74:       GetCurrent()->AppendLocalPath(&builder);
82:   virtual std::string RootPath() const = 0;
83:   virtual void AppendLocalPath(PathBuilder* builder) const = 0;
106:       DelegateLocalPath(*previous, builder);
124:     return previous ? DelegateRootPath(*previous) : "";
131:       DelegateLocalPath(*previous, builder);
145:     InLocalPath file(target);
154:     InLocalPath file(target);
android.googlesource.com/platform/packages/modules/common:proto/classpaths.proto: [ master, ]
31:   string path = 1;
19: enum Classpath {
21:   BOOTCLASSPATH = 1;
22:   SYSTEMSERVERCLASSPATH = 2;
23:   DEX2OATBOOTCLASSPATH = 3;
35:   Classpath classpath = 2;
51: message ExportedClasspathsJars {
30:   // Path on the filesystem for the jar.
27: // Individual entry in a classpath variable.
33:   // Environ classpath variable this jar belongs to.
34:   // Must be set to a known classpath.
37:   // Minimum API level required for the jar to be included on the classpath.
39:   // attribute, the jar will not be included in the classpath.
45:   // attribute, the jar will not be included in the classpath.
53:   // All jars that are exported as part of any classpath environ variable
github.com/apache/flex-whiteboard:rduartes/frameworks/projects/spark/src/spark/primitives/Path.as: [ trunk, ] Duplicate result
github.com/google/go-structeditor:structeditor/path.go: [ master, ]
24: type Path struct {
39: func StringToPath(s string) (*Path, error) {
49: func sliceToPath(slice []string) (*Path, error) {
69: func encodePath(s string) (*Path, error) {
23: // Path to a specific variable
29: 	// Name of struct field in path
33: 	// if nil, this Path refers to the top-level element
34: 	Next *Path
37: // Converts a string to a Path pointer. If the pointer is nil,
38: // the Path refers to the top-level ("current") element.
47: // Converts a string slice to a Path pointer. If the pointer is nil,
48: // the Path refers to the top-level ("current") element.
50: 	var first *Path
51: 	var cur *Path
68: // Encodes path part
75: 		return &Path{
80: 	return &Path{
85: // Appends the specified newElement to the path and
86: // returns the new root of the path.
87: func (p *Path) Append(newElement *Path) *Path {
88: 	var prevEl *Path
89: 	var curEl *Path
100: // Removes the last element from the path and returns
101: // the new root of the path
102: func (p *Path) RemoveLast() *Path {
106: 	var prevEl *Path
107: 	var curEl *Path
114: type VisitingFunc func(updatedPath *Path)
116: // Attaches the specified element to the path, runs the specified function, and
119: func (p *Path) Visiting(element *Path, doing VisitingFunc) {
125: func (p *Path) String() string {
44: 	return sliceToPath(sliced)
53: 		pathEl, err := encodePath(elt)
58: 			first = pathEl
60: 			cur.Next = pathEl
62: 		cur = pathEl
129: 	subpath := p.Next.String()
134: 	if subpath == "" {
137: 		return elt + "." + subpath
github.com/apache/incubator-retired-hdt:site/lib/path.pm: [ master, ]
1: package path;
github.com/Polymer/polymer-css-build:lib/pathresolver.js: [ master, ]
13: const path = require('path').posix;
35:       const pathname = path.relative(
36:         path.dirname(parsedFrom.pathname), parsedTo.pathname);
54:       let path = match.replace(/["']/g, "").slice(4, -1);
55:       path = this.rewriteRelPath(importUrl, mainDocUrl, path);
56:       return 'url("' + path + '")';
12: // Adapted from vulcanize's pathResolver, but only used for css text
26:   rewriteRelPath: function rewriteRelPath(importUrl, mainDocUrl, relUrl) {
38:         pathname,
github.com/kubernetes/kubernetes:vendor/github.com/vmware/govmomi/vim25/types/types.go: [ master, ]
9535: 	Path string                 `xml:"path"`
16915: 	Path         string     `xml:"path"`
17155: 	Path       string                 `xml:"path"`
18138: 	Path       string                  `xml:"path"`
21824: 	Path               string `xml:"path,omitempty"`
21861: 	Path                   []HostMultipathInfoPath                             `xml:"path"`
21910: 	Path []HostMultipathStateInfoPath `xml:"path,omitempty"`
22603: 	Path    []HostPlugStoreTopologyPath    `xml:"path,omitempty"`
22618: 	Path    []string `xml:"path,omitempty"`
22630: 	Path []string `xml:"path,omitempty"`
23031: 	Path string                 `xml:"path"`
27814: 	Path string `xml:"path,omitempty"`
28964: 	Path  string               `xml:"path"`
31651: 	Path              string `xml:"path"`
31667: 	Path              string `xml:"path"`
33986: 	Path    *ProfilePropertyPath `xml:"path,omitempty"`
37442: 	Path string                  `xml:"path"`
37469: 	Path string                 `xml:"path"`
37539: 	Path       string                  `xml:"path"`
43419: 	Path      string              `xml:"path"`
1241: 	UserInputPath ProfilePropertyPath `xml:"userInputPath"`
1281: 	UserInputPath ProfilePropertyPath `xml:"userInputPath"`
3050: type ArrayOfHostMultipathInfoPath struct {
3051: 	HostMultipathInfoPath []HostMultipathInfoPath `xml:"HostMultipathInfoPath,omitempty"`
3058: type ArrayOfHostMultipathStateInfoPath struct {
3059: 	HostMultipathStateInfoPath []HostMultipathStateInfoPath `xml:"HostMultipathStateInfoPath,omitempty"`
3226: type ArrayOfHostPlugStoreTopologyPath struct {
3227: 	HostPlugStoreTopologyPath []HostPlugStoreTopologyPath `xml:"HostPlugStoreTopologyPath,omitempty"`
4442: type ArrayOfProfilePropertyPath struct {
4443: 	ProfilePropertyPath []ProfilePropertyPath `xml:"ProfilePropertyPath,omitempty"`
5657: 	VmfsPath string                 `xml:"vmfsPath"`
5902: 	FilePath        string                            `xml:"filePath"`
6731: 	GuestFilePath  string                  `xml:"guestFilePath"`
8433: 	ApplyPath      ProfilePropertyPath `xml:"applyPath"`
8504: 	DevicePath      string                  `xml:"devicePath"`
8784: 	DevicePath []string               `xml:"devicePath,omitempty"`
8815: 	PropertyPath string                  `xml:"propertyPath"`
8899: type ConvertNamespacePathToUuidPath ConvertNamespacePathToUuidPathRequestType
9869: 	DirectoryPath string                  `xml:"directoryPath,omitempty"`
9892: 	DirectoryPath string                  `xml:"directoryPath,omitempty"`
11926: 	OldMountPath string                 `xml:"oldMountPath"`
12151: 	DirectoryPath string                  `xml:"directoryPath"`
12165: 	DatastorePath string                  `xml:"datastorePath"`
12191: 	FilePath string                  `xml:"filePath"`
12203: 	DatastorePath string                 `xml:"datastorePath"`
12654: 	VffsPath string                 `xml:"vffsPath"`
13030: type DisableMultipathPath DisableMultipathPathRequestType
13038: 	PathName string                 `xml:"pathName"`
15248: type EnableMultipathPath EnableMultipathPathRequestType
15256: 	PathName string                 `xml:"pathName"`
15891: 	VmfsPath string                 `xml:"vmfsPath"`
16116: 	VffsPath   string                 `xml:"vffsPath"`
16117: 	DevicePath string                 `xml:"devicePath"`
16510: 	MetaDataPath    *FaultToleranceMetaSpec     `xml:"metaDataPath,omitempty"`
17146: type FindByDatastorePath FindByDatastorePathRequestType
17187: type FindByInventoryPath FindByInventoryPathRequestType
17195: 	InventoryPath string                 `xml:"inventoryPath"`
18114: 	DiskPath  string `xml:"diskPath,omitempty"`
18388: 	ProgramPath      string   `xml:"programPath"`
18401: 	RegistryPath string `xml:"registryPath"`
19891: 	FolderPath string                  `xml:"folderPath,omitempty"`
20178: 	DevicePath string                `xml:"devicePath,omitempty"`
21622: 	LocalPath string `xml:"localPath"`
21890: type HostMultipathInfoPath struct {
21895: 	PathState     string                  `xml:"pathState"`
21897: 	IsWorkingPath *bool                   `xml:"isWorkingPath"`
21917: type HostMultipathStateInfoPath struct {
21921: 	PathState string `xml:"pathState"`
21932: 	RemotePath       string   `xml:"remotePath"`
21958: 	RemotePath      string   `xml:"remotePath"`
21959: 	LocalPath       string   `xml:"localPath"`
22637: type HostPlugStoreTopologyPath struct {
22660: 	ClaimedPath []string `xml:"claimedPath,omitempty"`
23241: 	DevicePath            string                `xml:"devicePath"`
23905: 	DevicePath   string                `xml:"devicePath"`
23921: 	ExtentDevicePath []string `xml:"extentDevicePath"`
23943: 	ExtentDevicePath []string `xml:"extentDevicePath"`
24082: 	DevicePath              []string                      `xml:"devicePath,omitempty"`
24146: 	DevicePath   string                 `xml:"devicePath"`
24769: 	CertPath  string                 `xml:"certPath"`
25147: 	GuestFilePath string                  `xml:"guestFilePath"`
25168: 	GuestFilePath  string                  `xml:"guestFilePath"`
25810: type InvalidDatastorePath struct {
25813: 	DatastorePath string `xml:"datastorePath"`
26206: 	RemotePath string `xml:"remotePath"`
26546: 	DnsSearchPath          string                  `xml:"dnsSearchPath,omitempty"`
26791: type IscsiFaultVnicIsLastPath struct {
26868: 	PathStatus        string          `xml:"pathStatus,omitempty"`
27564: 	FilePath     string                  `xml:"filePath"`
28159: 	DirectoryPath           string                  `xml:"directoryPath"`
29208: 	SrcDirectoryPath string                  `xml:"srcDirectoryPath"`
29209: 	DstDirectoryPath string                  `xml:"dstDirectoryPath"`
29229: 	SrcFilePath string                  `xml:"srcFilePath"`
29230: 	DstFilePath string                  `xml:"dstFilePath"`
29504: 	RemotePath string `xml:"remotePath"`
29531: 	RemotePath string `xml:"remotePath"`
29559: 	RemotePath string `xml:"remotePath"`
31697: 	VmPath string            `xml:"vmPath"`
33925: 	InputPath ProfilePropertyPath `xml:"inputPath"`
33999: 	InapplicablePath []string                               `xml:"inapplicablePath,omitempty"`
34129: type ProfilePropertyPath struct {
34132: 	ProfilePath string `xml:"profilePath"`
34201: 	ProfilePath ProfilePropertyPath `xml:"profilePath"`
34270: 	PathSet []string `xml:"pathSet,omitempty"`
34437: 	VffsPath string                 `xml:"vffsPath,omitempty"`
36255: 	DevicePath       string                 `xml:"devicePath"`
36295: 	DevicePath               string                 `xml:"devicePath"`
39523: 	DevicePath []string               `xml:"devicePath"`
40506: 	DatastorePath string                          `xml:"datastorePath"`
40516: 	DatastorePath string                          `xml:"datastorePath"`
40975: 	PasswordFilePath string `xml:"passwordFilePath"`
41671: 	DevicePath string `xml:"devicePath"`
41824: 	StatePath string             `xml:"statePath"`
44279: 	DevicePath string                 `xml:"devicePath"`
45487: 	VmfsPath string                 `xml:"vmfsPath"`
49433: 	PhysicalPath string                 `xml:"physicalPath"`
50718: 	ScreenshotFilePath string `xml:"screenshotFilePath"`
51600: 	ConfigPath string `xml:"configPath"`
51610: 	ConfigPath string `xml:"configPath"`
2050: type ArrayOfDatastoreMountPathDatastorePair struct {
2051: 	DatastoreMountPathDatastorePair []DatastoreMountPathDatastorePair `xml:"DatastoreMountPathDatastorePair,omitempty"`
3042: type ArrayOfHostMultipathInfoLogicalUnit struct {
3043: 	HostMultipathInfoLogicalUnit []HostMultipathInfoLogicalUnit `xml:"HostMultipathInfoLogicalUnit,omitempty"`
3170: type ArrayOfHostPathSelectionPolicyOption struct {
3171: 	HostPathSelectionPolicyOption []HostPathSelectionPolicyOption `xml:"HostPathSelectionPolicyOption,omitempty"`
8905: type ConvertNamespacePathToUuidPathRequestType struct {
8915: type ConvertNamespacePathToUuidPathResponse struct {
10867: 	VmDirectPathGen2Allowed *BoolPolicy              `xml:"vmDirectPathGen2Allowed,omitempty"`
10902: 	VmDirectPathGen2Active                 *bool          `xml:"vmDirectPathGen2Active"`
10903: 	VmDirectPathGen2InactiveReasonNetwork  []string       `xml:"vmDirectPathGen2InactiveReasonNetwork,omitempty"`
10904: 	VmDirectPathGen2InactiveReasonOther    []string       `xml:"vmDirectPathGen2InactiveReasonOther,omitempty"`
10905: 	VmDirectPathGen2InactiveReasonExtended string         `xml:"vmDirectPathGen2InactiveReasonExtended,omitempty"`
11177: 	VmDirectPathGen2Supported           bool                                    `xml:"vmDirectPathGen2Supported"`
11923: type DatastoreMountPathDatastorePair struct {
13036: type DisableMultipathPathRequestType struct {
13045: type DisableMultipathPathResponse struct {
15254: type EnableMultipathPathRequestType struct {
15263: type EnableMultipathPathResponse struct {
16499: 	ConfigPaths   []string `xml:"configPaths"`
17152: type FindByDatastorePathRequestType struct {
17162: type FindByDatastorePathResponse struct {
17193: type FindByInventoryPathRequestType struct {
17202: type FindByInventoryPathResponse struct {
19211: 	VmDirectPathGen2Supported                 *bool           `xml:"vmDirectPathGen2Supported"`
19212: 	VmDirectPathGen2UnsupportedReason         []string        `xml:"vmDirectPathGen2UnsupportedReason,omitempty"`
19213: 	VmDirectPathGen2UnsupportedReasonExtended string          `xml:"vmDirectPathGen2UnsupportedReasonExtended,omitempty"`
19495: 	MultipathState            *HostMultipathStateInfo              `xml:"multipathState,omitempty"`
21835: type HostMultipathInfo struct {
21845: type HostMultipathInfoFixedLogicalUnitPolicy struct {
21846: 	HostMultipathInfoLogicalUnitPolicy
21855: type HostMultipathInfoLogicalUnit struct {
21870: type HostMultipathInfoLogicalUnitPolicy struct {
21880: type HostMultipathInfoLogicalUnitStorageArrayTypePolicy struct {
21907: type HostMultipathStateInfo struct {
22531: type HostPathSelectionPolicyOption struct {
23611: 	MultipathInfo               *HostMultipathInfo       `xml:"multipathInfo,omitempty"`
25820: type InvalidDatastorePathFault InvalidDatastorePath
26711: type IscsiFaultVnicHasActivePaths struct {
26721: type IscsiFaultVnicHasActivePathsFault IscsiFaultVnicHasActivePaths
26801: type IscsiFaultVnicIsLastPathFault IscsiFaultVnicIsLastPath
33212: 	VmDirectPathGen2Supported             *bool                 `xml:"vmDirectPathGen2Supported"`
33213: 	VmDirectPathGen2SupportedMode         string                `xml:"vmDirectPathGen2SupportedMode,omitempty"`
35660: type QueryPathSelectionPolicyOptions QueryPathSelectionPolicyOptionsRequestType
35666: type QueryPathSelectionPolicyOptionsRequestType struct {
35674: type QueryPathSelectionPolicyOptionsResponse struct {
41142: type SetMultipathLunPolicy SetMultipathLunPolicyRequestType
41148: type SetMultipathLunPolicyRequestType struct {
41158: type SetMultipathLunPolicyResponse struct {
45271: 	MountPathDatastoreMapping []DatastoreMountPathDatastorePair `xml:"mountPathDatastoreMapping"`
47949: 	VmDirectPathGen2Supported *bool        `xml:"vmDirectPathGen2Supported"`
48535: 	VmPathName          string                       `xml:"vmPathName"`
48665: 	VmDirectPathGen2Active                 bool     `xml:"vmDirectPathGen2Active"`
48666: 	VmDirectPathGen2InactiveReasonVm       []string `xml:"vmDirectPathGen2InactiveReasonVm,omitempty"`
48667: 	VmDirectPathGen2InactiveReasonOther    []string `xml:"vmDirectPathGen2InactiveReasonOther,omitempty"`
48668: 	VmDirectPathGen2InactiveReasonExtended string   `xml:"vmDirectPathGen2InactiveReasonExtended,omitempty"`
48723: 	VmPathName          string `xml:"vmPathName,omitempty"`
51597: type VmReloadFromPathEvent struct {
51607: type VmReloadFromPathFailedEvent struct {
3055: 	t["ArrayOfHostMultipathInfoPath"] = reflect.TypeOf((*ArrayOfHostMultipathInfoPath)(nil)).Elem()
3063: 	t["ArrayOfHostMultipathStateInfoPath"] = reflect.TypeOf((*ArrayOfHostMultipathStateInfoPath)(nil)).Elem()
3231: 	t["ArrayOfHostPlugStoreTopologyPath"] = reflect.TypeOf((*ArrayOfHostPlugStoreTopologyPath)(nil)).Elem()
4447: 	t["ArrayOfProfilePropertyPath"] = reflect.TypeOf((*ArrayOfProfilePropertyPath)(nil)).Elem()
8902: 	t["ConvertNamespacePathToUuidPath"] = reflect.TypeOf((*ConvertNamespacePathToUuidPath)(nil)).Elem()
13033: 	t["DisableMultipathPath"] = reflect.TypeOf((*DisableMultipathPath)(nil)).Elem()
15251: 	t["EnableMultipathPath"] = reflect.TypeOf((*EnableMultipathPath)(nil)).Elem()
17149: 	t["FindByDatastorePath"] = reflect.TypeOf((*FindByDatastorePath)(nil)).Elem()
17190: 	t["FindByInventoryPath"] = reflect.TypeOf((*FindByInventoryPath)(nil)).Elem()
21904: 	t["HostMultipathInfoPath"] = reflect.TypeOf((*HostMultipathInfoPath)(nil)).Elem()
21925: 	t["HostMultipathStateInfoPath"] = reflect.TypeOf((*HostMultipathStateInfoPath)(nil)).Elem()
22651: 	t["HostPlugStoreTopologyPath"] = reflect.TypeOf((*HostPlugStoreTopologyPath)(nil)).Elem()
25817: 	t["InvalidDatastorePath"] = reflect.TypeOf((*InvalidDatastorePath)(nil)).Elem()
26798: 	t["IscsiFaultVnicIsLastPath"] = reflect.TypeOf((*IscsiFaultVnicIsLastPath)(nil)).Elem()
34138: 	t["ProfilePropertyPath"] = reflect.TypeOf((*ProfilePropertyPath)(nil)).Elem()
2055: 	t["ArrayOfDatastoreMountPathDatastorePair"] = reflect.TypeOf((*ArrayOfDatastoreMountPathDatastorePair)(nil)).Elem()
3047: 	t["ArrayOfHostMultipathInfoLogicalUnit"] = reflect.TypeOf((*ArrayOfHostMultipathInfoLogicalUnit)(nil)).Elem()
3175: 	t["ArrayOfHostPathSelectionPolicyOption"] = reflect.TypeOf((*ArrayOfHostPathSelectionPolicyOption)(nil)).Elem()
8912: 	t["ConvertNamespacePathToUuidPathRequestType"] = reflect.TypeOf((*ConvertNamespacePathToUuidPathRequestType)(nil)).Elem()
11931: 	t["DatastoreMountPathDatastorePair"] = reflect.TypeOf((*DatastoreMountPathDatastorePair)(nil)).Elem()
13042: 	t["DisableMultipathPathRequestType"] = reflect.TypeOf((*DisableMultipathPathRequestType)(nil)).Elem()
15260: 	t["EnableMultipathPathRequestType"] = reflect.TypeOf((*EnableMultipathPathRequestType)(nil)).Elem()
17159: 	t["FindByDatastorePathRequestType"] = reflect.TypeOf((*FindByDatastorePathRequestType)(nil)).Elem()
17199: 	t["FindByInventoryPathRequestType"] = reflect.TypeOf((*FindByInventoryPathRequestType)(nil)).Elem()
21838: 	Lun []HostMultipathInfoLogicalUnit `xml:"lun,omitempty"`
21842: 	t["HostMultipathInfo"] = reflect.TypeOf((*HostMultipathInfo)(nil)).Elem()
21852: 	t["HostMultipathInfoFixedLogicalUnitPolicy"] = reflect.TypeOf((*HostMultipathInfoFixedLogicalUnitPolicy)(nil)).Elem()
21862: 	Policy                 BaseHostMultipathInfoLogicalUnitPolicy              `xml:"policy,typeattr"`
21863: 	StorageArrayTypePolicy *HostMultipathInfoLogicalUnitStorageArrayTypePolicy `xml:"storageArrayTypePolicy,omitempty"`
21867: 	t["HostMultipathInfoLogicalUnit"] = reflect.TypeOf((*HostMultipathInfoLogicalUnit)(nil)).Elem()
21877: 	t["HostMultipathInfoLogicalUnitPolicy"] = reflect.TypeOf((*HostMultipathInfoLogicalUnitPolicy)(nil)).Elem()
21887: 	t["HostMultipathInfoLogicalUnitStorageArrayTypePolicy"] = reflect.TypeOf((*HostMultipathInfoLogicalUnitStorageArrayTypePolicy)(nil)).Elem()
21914: 	t["HostMultipathStateInfo"] = reflect.TypeOf((*HostMultipathStateInfo)(nil)).Elem()
22538: 	t["HostPathSelectionPolicyOption"] = reflect.TypeOf((*HostPathSelectionPolicyOption)(nil)).Elem()
25823: 	t["InvalidDatastorePathFault"] = reflect.TypeOf((*InvalidDatastorePathFault)(nil)).Elem()
26718: 	t["IscsiFaultVnicHasActivePaths"] = reflect.TypeOf((*IscsiFaultVnicHasActivePaths)(nil)).Elem()
26724: 	t["IscsiFaultVnicHasActivePathsFault"] = reflect.TypeOf((*IscsiFaultVnicHasActivePathsFault)(nil)).Elem()
26804: 	t["IscsiFaultVnicIsLastPathFault"] = reflect.TypeOf((*IscsiFaultVnicIsLastPathFault)(nil)).Elem()
35663: 	t["QueryPathSelectionPolicyOptions"] = reflect.TypeOf((*QueryPathSelectionPolicyOptions)(nil)).Elem()
35671: 	t["QueryPathSelectionPolicyOptionsRequestType"] = reflect.TypeOf((*QueryPathSelectionPolicyOptionsRequestType)(nil)).Elem()
35675: 	Returnval []HostPathSelectionPolicyOption `xml:"returnval,omitempty"`
41145: 	t["SetMultipathLunPolicy"] = reflect.TypeOf((*SetMultipathLunPolicy)(nil)).Elem()
41151: 	Policy BaseHostMultipathInfoLogicalUnitPolicy `xml:"policy,typeattr"`
41155: 	t["SetMultipathLunPolicyRequestType"] = reflect.TypeOf((*SetMultipathLunPolicyRequestType)(nil)).Elem()
51604: 	t["VmReloadFromPathEvent"] = reflect.TypeOf((*VmReloadFromPathEvent)(nil)).Elem()
51614: 	t["VmReloadFromPathFailedEvent"] = reflect.TypeOf((*VmReloadFromPathFailedEvent)(nil)).Elem()
github.com/kubernetes/kubernetes:api/swagger-spec/v1.json: [ master, ]
12:     "path": "/api/v1/namespaces/{namespace}/bindings",
75:     "path": "/api/v1/componentstatuses",
178:     "path": "/api/v1/componentstatuses/{name}",
223:     "path": "/api/v1/namespaces/{namespace}/configmaps",
494:     "path": "/api/v1/watch/namespaces/{namespace}/configmaps",
605:     "path": "/api/v1/namespaces/{namespace}/configmaps/{name}",
870:     "path": "/api/v1/watch/namespaces/{namespace}/configmaps/{name}",
989:     "path": "/api/v1/configmaps",
1092:     "path": "/api/v1/watch/configmaps",
1195:     "path": "/api/v1/namespaces/{namespace}/endpoints",
1466:     "path": "/api/v1/watch/namespaces/{namespace}/endpoints",
1577:     "path": "/api/v1/namespaces/{namespace}/endpoints/{name}",
1842:     "path": "/api/v1/watch/namespaces/{namespace}/endpoints/{name}",
1961:     "path": "/api/v1/endpoints",
2064:     "path": "/api/v1/watch/endpoints",
2167:     "path": "/api/v1/namespaces/{namespace}/events",
2438:     "path": "/api/v1/watch/namespaces/{namespace}/events",
2549:     "path": "/api/v1/namespaces/{namespace}/events/{name}",
2814:     "path": "/api/v1/watch/namespaces/{namespace}/events/{name}",
2933:     "path": "/api/v1/events",
3036:     "path": "/api/v1/watch/events",
3139:     "path": "/api/v1/namespaces/{namespace}/limitranges",
3410:     "path": "/api/v1/watch/namespaces/{namespace}/limitranges",
3521:     "path": "/api/v1/namespaces/{namespace}/limitranges/{name}",
3786:     "path": "/api/v1/watch/namespaces/{namespace}/limitranges/{name}",
3905:     "path": "/api/v1/limitranges",
4008:     "path": "/api/v1/watch/limitranges",
4111:     "path": "/api/v1/namespaces",
4263:     "path": "/api/v1/watch/namespaces",
4366:     "path": "/api/v1/namespaces/{name}",
4599:     "path": "/api/v1/watch/namespaces/{name}",
4710:     "path": "/api/v1/namespaces/{name}/finalize",
4768:     "path": "/api/v1/namespaces/{name}/status",
4914:     "path": "/api/v1/nodes",
5161:     "path": "/api/v1/watch/nodes",
5264:     "path": "/api/v1/nodes/{name}",
5497:     "path": "/api/v1/watch/nodes/{name}",
5608:     "path": "/api/v1/proxy/nodes/{name}/{path}",
5824:     "path": "/api/v1/proxy/nodes/{name}",
5984:     "path": "/api/v1/nodes/{name}/proxy",
6200:     "path": "/api/v1/nodes/{name}/proxy/{path}",
6472:     "path": "/api/v1/nodes/{name}/status",
6618:     "path": "/api/v1/namespaces/{namespace}/persistentvolumeclaims",
6889:     "path": "/api/v1/watch/namespaces/{namespace}/persistentvolumeclaims",
7000:     "path": "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}",
7265:     "path": "/api/v1/watch/namespaces/{namespace}/persistentvolumeclaims/{name}",
7384:     "path": "/api/v1/persistentvolumeclaims",
7487:     "path": "/api/v1/watch/persistentvolumeclaims",
7590:     "path": "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status",
7760:     "path": "/api/v1/persistentvolumes",
8007:     "path": "/api/v1/watch/persistentvolumes",
8110:     "path": "/api/v1/persistentvolumes/{name}",
8343:     "path": "/api/v1/watch/persistentvolumes/{name}",
8454:     "path": "/api/v1/persistentvolumes/{name}/status",
8600:     "path": "/api/v1/namespaces/{namespace}/pods",
8871:     "path": "/api/v1/watch/namespaces/{namespace}/pods",
8982:     "path": "/api/v1/namespaces/{namespace}/pods/{name}",
9247:     "path": "/api/v1/watch/namespaces/{namespace}/pods/{name}",
9366:     "path": "/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}",
9638:     "path": "/api/v1/proxy/namespaces/{namespace}/pods/{name}",
9854:     "path": "/api/v1/pods",
9957:     "path": "/api/v1/watch/pods",
10060:     "path": "/api/v1/namespaces/{namespace}/pods/{name}/attach",
10206:     "path": "/api/v1/namespaces/{namespace}/pods/{name}/binding",
10277:     "path": "/api/v1/namespaces/{namespace}/pods/{name}/eviction",
10348:     "path": "/api/v1/namespaces/{namespace}/pods/{name}/exec",
10510:     "path": "/api/v1/namespaces/{namespace}/pods/{name}/log",
10620:     "path": "/api/v1/namespaces/{namespace}/pods/{name}/portforward",
10702:     "path": "/api/v1/namespaces/{namespace}/pods/{name}/proxy",
10974:     "path": "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}",
11302:     "path": "/api/v1/namespaces/{namespace}/pods/{name}/status",
11472:     "path": "/api/v1/namespaces/{namespace}/podtemplates",
11743:     "path": "/api/v1/watch/namespaces/{namespace}/podtemplates",
11854:     "path": "/api/v1/namespaces/{namespace}/podtemplates/{name}",
12119:     "path": "/api/v1/watch/namespaces/{namespace}/podtemplates/{name}",
12238:     "path": "/api/v1/podtemplates",
12341:     "path": "/api/v1/watch/podtemplates",
12444:     "path": "/api/v1/namespaces/{namespace}/replicationcontrollers",
12715:     "path": "/api/v1/watch/namespaces/{namespace}/replicationcontrollers",
12826:     "path": "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}",
13091:     "path": "/api/v1/watch/namespaces/{namespace}/replicationcontrollers/{name}",
13210:     "path": "/api/v1/replicationcontrollers",
13313:     "path": "/api/v1/watch/replicationcontrollers",
13416:     "path": "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale",
13586:     "path": "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status",
13756:     "path": "/api/v1/namespaces/{namespace}/resourcequotas",
14027:     "path": "/api/v1/watch/namespaces/{namespace}/resourcequotas",
14138:     "path": "/api/v1/namespaces/{namespace}/resourcequotas/{name}",
14403:     "path": "/api/v1/watch/namespaces/{namespace}/resourcequotas/{name}",
14522:     "path": "/api/v1/resourcequotas",
14625:     "path": "/api/v1/watch/resourcequotas",
14728:     "path": "/api/v1/namespaces/{namespace}/resourcequotas/{name}/status",
14898:     "path": "/api/v1/namespaces/{namespace}/secrets",
15169:     "path": "/api/v1/watch/namespaces/{namespace}/secrets",
15280:     "path": "/api/v1/namespaces/{namespace}/secrets/{name}",
15545:     "path": "/api/v1/watch/namespaces/{namespace}/secrets/{name}",
15664:     "path": "/api/v1/secrets",
15767:     "path": "/api/v1/watch/secrets",
15870:     "path": "/api/v1/namespaces/{namespace}/serviceaccounts",
16141:     "path": "/api/v1/watch/namespaces/{namespace}/serviceaccounts",
16252:     "path": "/api/v1/namespaces/{namespace}/serviceaccounts/{name}",
16517:     "path": "/api/v1/watch/namespaces/{namespace}/serviceaccounts/{name}",
16636:     "path": "/api/v1/serviceaccounts",
16739:     "path": "/api/v1/watch/serviceaccounts",
16842:     "path": "/api/v1/namespaces/{namespace}/services",
17010:     "path": "/api/v1/watch/namespaces/{namespace}/services",
17121:     "path": "/api/v1/namespaces/{namespace}/services/{name}",
17354:     "path": "/api/v1/watch/namespaces/{namespace}/services/{name}",
17473:     "path": "/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}",
17745:     "path": "/api/v1/proxy/namespaces/{namespace}/services/{name}",
17961:     "path": "/api/v1/services",
18064:     "path": "/api/v1/watch/services",
18167:     "path": "/api/v1/namespaces/{namespace}/services/{name}/proxy",
18439:     "path": "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}",
18767:     "path": "/api/v1/namespaces/{namespace}/services/{name}/status",
18937:     "path": "/api/v1",
4:   "basePath": "https://10.10.10.10:6443",
5:   "resourcePath": "/api/v1",
39:         "paramType": "path",
197:         "paramType": "path",
306:         "paramType": "path",
355:         "paramType": "path",
468:         "paramType": "path",
577:         "paramType": "path",
640:         "paramType": "path",
648:         "paramType": "path",
695:         "paramType": "path",
703:         "paramType": "path",
755:         "paramType": "path",
763:         "paramType": "path",
836:         "paramType": "path",
844:         "paramType": "path",
953:         "paramType": "path",
961:         "paramType": "path",
1278:         "paramType": "path",
1327:         "paramType": "path",
1440:         "paramType": "path",
1549:         "paramType": "path",
1612:         "paramType": "path",
1620:         "paramType": "path",
1667:         "paramType": "path",
1675:         "paramType": "path",
1727:         "paramType": "path",
1735:         "paramType": "path",
1808:         "paramType": "path",
1816:         "paramType": "path",
1925:         "paramType": "path",
1933:         "paramType": "path",
2250:         "paramType": "path",
2299:         "paramType": "path",
2412:         "paramType": "path",
2521:         "paramType": "path",
2584:         "paramType": "path",
2592:         "paramType": "path",
2639:         "paramType": "path",
2647:         "paramType": "path",
2699:         "paramType": "path",
2707:         "paramType": "path",
2780:         "paramType": "path",
2788:         "paramType": "path",
2897:         "paramType": "path",
2905:         "paramType": "path",
3222:         "paramType": "path",
3271:         "paramType": "path",
3384:         "paramType": "path",
3493:         "paramType": "path",
3556:         "paramType": "path",
3564:         "paramType": "path",