Commit Graph

23 Commits (c768b3c4f0521be0337355713f5ba81e0d33509d)

Author SHA1 Message Date
Doug Coleman 3ac520a8ec io.pathnames: Add canonicalize-path.
The idea is to make a canonical representation of any path, taking into
account . and .. and unicode-prefix on Windows.

The use case is in a shell you have a current-directory and you can do
crazy commands like ``cd ../foo/bar/baz/../.././././`` and get the
canonical/shortened directory name. You can also use this word to
compare if two paths are the same.
2018-07-07 11:59:59 -05:00
John Benediktsson 2269b07d33 use with-temp-file and with-temp-directory in some tests. 2016-04-04 10:33:03 -07:00
Doug Coleman fe7d6ea76e io.pathnames: don't use temp-file 2016-03-30 17:31:32 -07:00
John Benediktsson b75def3bfb hashtables: remove 2hashtable (not really used). 2016-03-03 14:38:16 -08:00
Doug Coleman 9c4ed3ddae core: Don't use with-scope. H{ } clone [ ] with-variables is the same thing and is more explicit. 2016-03-02 17:18:42 -08:00
Doug Coleman 43d6f1d3e2 factor: Retrying on the unit tests. Also normalize some syntax with FUNCTION:. 2015-07-02 17:28:17 -07:00
Doug Coleman 59f3b1ea57 Revert "factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!"
Needs a bit more work.

This reverts commit 7e54cc2824.
2015-07-02 13:47:06 -07:00
Doug Coleman 7e54cc2824 factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool! 2015-07-02 11:36:08 -07:00
Doug Coleman 999aa7c897 factor: clean up spaces in -tests files 2015-07-02 10:34:01 -07:00
John Benediktsson 4e72d80256 Using "same?" in more places. 2012-07-21 10:22:44 -07:00
otoburb 152c301d49 io.pathnames: Revised ~ support to expand on the first tilde, and not on "~/".
This mimics the same behaviour as "ls ~" in the shell, which expands the alias
as a directory, and not as a filename. For the specific edge-case where a
filename called "~" must have a path constructed to it (e.g. "./~" or "~/~").
2012-03-30 21:01:57 -07:00
otoburb cb6eb8b2bd io.pathnames: Added ~/ (tilde) prefix recognition as a special pathname.
vocab:, resource: and ~/ are special pathnames. Modified absolute-path word,
added test cases and updated io.pathname documentation.
2012-03-30 21:01:46 -07:00
Joe Groff 0ddb6fa96e Revert "io.pathnames: Added ~/ (tilde) prefix recognition as a special pathname."
This reverts commit 4e10f09787.
2012-01-31 11:46:02 -08:00
Joe Groff af8dc62104 Revert "io.pathnames: Revised ~ support to expand on the first tilde, and not on "~/"."
This reverts commit 251a2a19a6.
2012-01-31 11:45:51 -08:00
otoburb dc11f2d7a2 io.pathnames: Revised ~ support to expand on the first tilde, and not on "~/".
This mimics the same behaviour as "ls ~" in the shell, which expands the alias
as a directory, and not as a filename. For the specific edge-case where a
filename called "~" must have a path constructed to it (e.g. "./~" or "~/~").
2012-01-11 02:36:47 +00:00
otoburb a5e8cc75b9 io.pathnames: Added ~/ (tilde) prefix recognition as a special pathname.
vocab:, resource: and ~/ are special pathnames. Modified absolute-path word,
added test cases and updated io.pathname documentation.
2012-01-11 02:36:47 +00:00
Joe Groff 1250a0fcfd Revert "make io.pathnames tests path-separator-neutral"
This reverts commit f344c00629.
2010-02-17 16:06:13 -08:00
Joe Groff 6ac33f6dea make io.pathnames tests path-separator-neutral 2010-02-16 19:28:51 -08:00
Doug Coleman e376a0ece2 (normalize-path) -> absolute-path, canonicalize-path -> resolve-symlinks 2009-10-28 17:25:50 -05:00
Doug Coleman 4cec00f209 improve io.pathnames docs 2009-10-16 05:48:37 -05:00
Doug Coleman 2af9d5a6df add canonicalize-path, fix a bug in file-extension 2009-02-18 13:33:55 -06:00
Slava Pestov 6ea1de887d More unit test fixes 2008-12-14 22:38:14 -06:00
Slava Pestov 50e214c152 io.files split up and general refactoring work in progress 2008-12-14 20:03:00 -06:00