[{"name":"Path","comment":"\n\n\n# Paths\n\n@docs Path, Platform, fromString, toString, fromList, toList\n\n@docs separator, delimiter, platform, dir, base, name, ext\n\n","unions":[],"aliases":[{"name":"Path","comment":" Parsed and normalised path.\n","args":[],"type":"Path.Internal.Path"},{"name":"Platform","comment":" Represents a platform used for parsing the strings, either Win32 or Posix.\nCreate or infer platforms with [`Path.Platform`](Path-Platform)\n","args":[],"type":"Path.Internal.Platform"}],"values":[{"name":"base","comment":" Get the full file name or last directory name of a path.\n\n    Result.map Path.base (Path.fromString Path.Platform.posix \"/static/images/image.jpeg/\" ]) == Ok \"image.jpeg\"\n    Result.map Path.base (Path.fromString Path.Platform.posix \"../..//.///foo\") == Ok \"foo\"\n    Result.map Path.base (Path.fromString Path.Platform.posix \"./x/b/..//b/c.prod.js\") == Ok \"c.prod.js\"\n    Result.map Path.base (Path.fromString Path.Platform.posix \"./x/b/..//b/.hidden\") == Ok \".hidden\"\n\n","type":"Path.Path -> String.String"},{"name":"delimiter","comment":" Get the delimiter of a path.\n\n    Result.map Path.delimiter (Path.fromString Path.Platform.posix \"/static/images/image.jpeg/\" ]) == Ok \":\"\n    Result.map Path.delimiter (Path.fromString Path.Platform.posix \"../..//.///foo\") == Ok \":\"\n    Result.map Path.delimiter (Path.fromString Path.Platform.win32 \"./x/b/..//b/c.prod.js\") == Ok \";\"\n    Result.map Path.delimiter (Path.fromString Path.Platform.posix \"./x/b/..//b/.hidden\") == Ok \":\"\n\n","type":"Path.Path -> String.String"},{"name":"dir","comment":" Get the directory of a path.\n\n    Result.map Path.dir (Path.fromString Path.Platform.posix \"/static/images/image.jpeg/\" ]) == Ok \"/static/images\"\n    Result.map Path.dir (Path.fromString Path.Platform.posix \"../..//.///foo\") == Ok \"../..\"\n    Result.map Path.dir (Path.fromString Path.Platform.posix \"./x/b/..//b/c.prod.js\") == Ok \"x/b\"\n    Result.map Path.dir (Path.fromString Path.Platform.posix \"./x/b/..//b/.hidden\") == Ok \"x/b\"\n\n","type":"Path.Path -> String.String"},{"name":"ext","comment":" Get the file extension (if it exists) of a path. Will only take from the last \".\".\n\n    Result.map Path.ext (Path.fromString Path.Platform.posix \"/static/images/image.jpeg/\" ]) == Ok \".jpeg\"\n    Result.map Path.ext (Path.fromString Path.Platform.posix \"../..//.///foo\") == Ok \"\"\n    Result.map Path.ext (Path.fromString Path.Platform.posix \"./x/b/..//b/c.prod.js\") == Ok \".js\"\n    Result.map Path.ext (Path.fromString Path.Platform.posix \"./x/b/..//b/.hidden\") == Ok \"\"\n\n","type":"Path.Path -> String.String"},{"name":"fromList","comment":" Create a path from a list of strings. Some notes:\n\n  - If passed a path with a root, it will _not_ overwrite previous segments, it will add the root to the path. This is similar to Node path behaviour and different from Python os.path behaviour.\n\n  - If passed a valid root as the first element in the list, will not add a separator between the first and second elements\n\n  - Will ignore empty strings\n\n  - Won't ignore spaces!\n\n```elm\nResult.map Path.toString (Path.fromList Path.Platform.posix [ \"/static\", \"images\", \"/image.jpeg\" ]) == Ok \"/static/images/image.jpeg\"\nResult.map Path.toString (Path.fromList Path.Platform.posix [ \"\", \"..\", \"..\", \"/foo\" ]) == Ok \"../../foo\"\nResult.map Path.toString (Path.fromList Path.Platform.posix [ \".\", \"x/b\", \"..\", \"/b/c.js\" ]) == Ok \"x/b/c.js\"\nResult.map Path.toString (Path.fromList Path.Platform.win32 [ \"a:\", \"\\\\b\" ][ \"a:\", \"\\b\" ][ \"a:\", \"\\\\b\" ]) == Ok \"a:\\\\b\"\nResult.map Path.toString (Path.fromList Path.Platform.win32 [ \"a:\", \"b\\\\c\" ][ \"a:\", \"b\\c\" ][ \"a:\", \"b\\\\c\" ]) == Ok \"a:b\\\\c\"\nResult.map Path.toString (Path.fromList Path.Platform.posix []) == Ok \".\"\nResult.map Path.toString (Path.fromList Path.Platform.posix [ \" \", \"foo\" ]) == Ok \" /foo\"\n```\n\n","type":"Path.Platform -> List.List String.String -> Result.Result String.String Path.Path"},{"name":"fromString","comment":" Create a path from a string. The path will be normalised and any trailing slashes will be dropped.\nNote this will _not_ raise an error on invalid path characters\n\n    Result.map Path.toString (Path.fromString Path.Platform.posix \"/static/images/image.jpeg/\" ]) == Ok \"/static/images/image.jpeg\"\n    Result.map Path.toString (Path.fromString Path.Platform.posix \"../..//.///foo\") == Ok \"../../foo\"\n    Result.map Path.toString (Path.fromString Path.Platform.posix \"./x/b/..//b/c.js\") == Ok \"x/b/c.js\"\n    Result.map Path.toString (Path.fromString Path.Platform.win32 \"a:\\\\b\") == Ok \"a:\\\\b\"\n    Result.map Path.toString (Path.fromString Path.Platform.win32 \"\\\\\\\\machine\\\\server\\\\\\\\path\") == Ok \"\\\\\\\\machine\\\\server\\\\path\"\n    Result.map Path.toString (Path.fromString Path.Platform.posix \"\") == Ok \".\"\n    Result.map Path.toString (Path.fromString Path.Platform.posix \" foo\") == Ok \" foo\"\n\n","type":"Path.Platform -> String.String -> Result.Result String.String Path.Path"},{"name":"name","comment":" Get the file name (without extension) or last directory name of a path. Will take from the left of the last \".\".\n\n    Result.map Path.name (Path.fromString Path.Platform.posix \"/static/images/image.jpeg/\" ]) == Ok \"image\"\n    Result.map Path.name (Path.fromString Path.Platform.posix \"../..//.///foo\") == Ok \"foo\"\n    Result.map Path.name (Path.fromString Path.Platform.posix \"./x/b/..//b/c.prod.js\") == Ok \"c.prod\"\n    Result.map Path.name (Path.fromString Path.Platform.posix \"./x/b/..//b/.hidden\") == Ok \".hidden\"\n\n","type":"Path.Path -> String.String"},{"name":"platform","comment":" Get the platform of a path.\n\n    Result.map Path.platform (Path.fromString Path.Platform.posix \"/static/images/image.jpeg/\" ]) == Ok Path.Platform.posix\n    Result.map Path.platform (Path.fromString Path.Platform.posix \"../..//.///foo\") == Ok Path.Platform.posix\n    Result.map Path.platform (Path.fromString Path.Platform.win32 \"./x/b/..//b/c.prod.js\") == Ok Path.Platform.win32\n    Result.map Path.platform (Path.fromString Path.Platform.posix \"./x/b/..//b/.hidden\") == Ok Path.Platform.posix\n\n","type":"Path.Path -> Path.Platform"},{"name":"separator","comment":" Get the separator of a path.\n\n    Result.map Path.separator (Path.fromString Path.Platform.posix \"/static/images/image.jpeg/\" ]) == Ok \"/\"\n    Result.map Path.separator (Path.fromString Path.Platform.posix \"../..//.///foo\") == Ok \"/\"\n    Result.map Path.separator (Path.fromString Path.Platform.win32 \"./x/b/..//b/c.prod.js\") == Ok \"\\\\\"\n    Result.map Path.separator (Path.fromString Path.Platform.posix \"./x/b/..//b/.hidden\") == Ok \"/\"\n\n","type":"Path.Path -> String.String"},{"name":"toList","comment":" Turn a path into a list of directory and file name segments. Includes the path root.\n\n    Result.map Path.toList (Path.fromString \"/static/images/image.jpeg\") == Ok [ \"/\", \"static\", \"images\", \"image.jpeg\" ]\n\n    Result.map Path.toList (Path.fromString \"c:\\\\static\\\\images\\\\image.jpeg\") == Ok [ \"c:\\\\\", \"static\", \"images\", \"image.jpeg\" ]\n\n    Result.map Path.toList (Path.fromString \"static/images/image.jpeg\") == Ok [ \"static\", \"images\", \"image.jpeg\" ]\n\n","type":"Path.Path -> List.List String.String"},{"name":"toString","comment":" Turn a path into a string.\n\n    Result.map Path.toString (Path.fromString Path.Platform.posix \"/static/images/image.jpeg/\") == Ok \"/static/images/image.jpeg\"\n\n    Result.map Path.toString (Path.fromString Path.Platform.win32 \"c:\\\\static\\\\images\\\\image.jpeg\") == Ok \"c:\\\\static\\\\images\\\\image.jpeg\"\n\n    Result.map Path.toString (Path.fromString Path.Platform.posix \"static/////images///image.jpeg///////\") == Ok \"static/images/image.jpeg\"\n\n    Result.map Path.toString (Path.fromString Path.Platform.posix \"\") == Ok \".\"\n\n    Result.map Path.toString (Path.fromString Path.Platform.posix \"a/../b/./c/../\") == Ok \"b\"\n\n","type":"Path.Path -> String.String"}],"binops":[]},{"name":"Path.Platform","comment":"\n\n\n# Path.Platform\n\n@docs Platform, win32, posix, fromSeparator, separator, delimiter\n\n","unions":[],"aliases":[{"name":"Platform","comment":" Represents a platform used for parsing the strings, either Win32 or Posix.\nCreate or infer platforms with [`win32`](#win32), [`posix`](#posix) and [`fromSeparator`](#fromSeparator)\n","args":[],"type":"Path.Internal.Platform"}],"values":[{"name":"delimiter","comment":" Delimiter of a platform.\n\n    Path.Platform.delimiter Path.Platform.posix == \":\"\n\n    Path.Platform.delimiter Path.Platform.win32 == \";\"\n\n","type":"Path.Platform.Platform -> String.String"},{"name":"fromSeparator","comment":" Get platform based on a separator. This will default to Posix!\nYou can find the separator using Node with `path.sep`,\nin Python with `os.path.sep`, and pass it in to Elm.\n\n    Path.Platform.fromSeparator \"/\" == Path.Platform.posix\n\n    Path.Platform.fromSeparator \"\\\\\" == Path.Platform.win32\n\n    Path.Platform.fromSeparator \"lkjankljsAKSKJ\" == Path.Platform.posix\n\n","type":"String.String -> Path.Platform.Platform"},{"name":"posix","comment":" Posix. Use when you want to hardcode platform into Path functions.\nIf you are unsure what platform you need, use [`fromSeparator`](#fromSeparator) to infer it.\n\n    Path.Platform.fromString Path.Platform.posix \"/A/B/C.elm\"\n\n","type":"Path.Platform.Platform"},{"name":"separator","comment":" The separator of a platform.\n\n    Path.Platform.separator Path.Platform.posix == \"/\"\n\n    Path.Platform.separator Path.Platform.win32 == \"\\\\\"\n\n","type":"Path.Platform.Platform -> String.String"},{"name":"win32","comment":" Win32. Use when you want to hardcode platform into Path functions.\nIf you are unsure what platform you need, use [`fromSeparator`](#fromSeparator) to infer it.\n\n    Path.Platform.fromString Path.Platform.win32 \"c:/A/B/C.elm\"\n\n","type":"Path.Platform.Platform"}],"binops":[]}]