The corresponding makeAbsolute function can be found in paths, as the presence of symlinks means. Posix: normalise "bob/fred/." = "bob/fred/"Ĭontract a filename, based on a relative path. Windows: normalise "c:/file" = "C:ile" Windows: normalise "//server/test" = "\server est" Windows: normalise "\server est" = "\server est" Posix: normalise "./bob/fred/" = "bob/fred/" Posix: normalise "./bob/fred/" = "./bob/fred/" Posix: normalise "/test/file/./bob/fred/" = "/test/file/./bob/fred/" Posix: normalise "/file/./test" = "/file/test" // outside of the drive can be made blankĭoes not remove ".", because of symlinks.The current behavior of is to never combine these forms. To the current directory on the drive with the specified letter." On Windows, from : "If a file name begins with only a disk designatorīut not the backslash after the colon, it is interpreted as a relative path In, this is (confusingly) referred to as an On Windows, if a filepath starts with a single slash, it is relative to the Not combined: Posix: "home" "/bob" = "/bob" Valid x => (takeDirectory x takeFileName x) `equalFilePath` x Windows: "/directory" "file.ext" = "/directoryile.ext" Posix: "/directory" "file.ext" = "/directory/file.ext" The intention is that readFile (dir file) will access the same file as If the second path starts with a path separator or a drive letter, then it returns the second.
0 Comments
Leave a Reply. |