]> gitweb.factorcode.org Git - factor.git/commitdiff
make words public again
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 16 Oct 2009 21:59:25 +0000 (16:59 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 16 Oct 2009 21:59:25 +0000 (16:59 -0500)
core/io/pathnames/pathnames-docs.factor
core/io/pathnames/pathnames.factor

index cc65d5da5dddf46daec613c1df5e61d8088dbbb0..8b293da3ccb197e279875a46ecbfc8cda89ce8d6 100644 (file)
@@ -7,7 +7,7 @@ HELP: path-separator?
 { $description "Tests if the code point is a platform-specific path separator." }
 { $examples
     "On Unix:"
-    { $example "USING: io.pathnames.private prettyprint ;" "CHAR: / path-separator? ." "t" }
+    { $example "USING: io.pathnames prettyprint ;" "CHAR: / path-separator? ." "t" }
 } ;
 
 HELP: parent-directory
@@ -90,8 +90,9 @@ HELP: pathname
 
 HELP: normalize-path
 { $values { "string" "a pathname string" } { "string'" "a new pathname string" } }
-{ $description "Prepends the " { $link current-directory } " to the pathname, resolves a " { $snippet "resource:" } " prefix, if present, and performs any platform-specific pathname normalization." }
+{ $description "Prepends the " { $link current-directory } " to the pathname, resolves a " { $snippet "resource:" } " or " { $snippet "voacb:" } " prefix, if present, and performs any platform-specific pathname normalization." }
 { $notes "High-level words, such as " { $link <file-reader> } " and " { $link delete-file } " call this word for you. It only needs to be called directly when passing pathnames to C functions or external processes. This is because Factor does not use the operating system's notion of a current directory, and instead maintains its own dynamically-scoped " { $link current-directory } " variable." }
+{ $notes "On Windows NT platforms, this word does prepends the Unicode path prefix." }
 { $examples
   "For example, if you create a file named " { $snippet "data.txt" } " in the current directory, and wish to pass it to a process, you must normalize it:"
   { $code
@@ -100,6 +101,14 @@ HELP: normalize-path
   }
 } ;
 
+HELP: (normalize-path)
+{ $values
+    { "path" "a pathname string" }
+    { "path'" "a pathname string" }
+}
+{ $description "Prepends the " { $link current-directory } " to the pathname and resolves a " { $snippet "resource:" } " prefix, if present." }
+{ $notes "On Windows NT platforms, this word does not prepend the Unicode path prefix." } ;
+
 HELP: canonicalize-path
 { $values { "path" "a pathname string" } { "path'" "a new pathname string" } }
 { $description "Outputs a path where none of the path components are symlinks. This word is useful for determining the actual path on disk where a file is stored; the root of this absolute path is a mount point in the file-system." }
index 4a38d2e4aaa3336df1b6868d9c7814c7ef4629b3..e8672e6771e68101d0c0fb81ca4ba87ecf546818 100644 (file)
@@ -6,8 +6,6 @@ IN: io.pathnames
 
 SYMBOL: current-directory
 
-<PRIVATE
-
 : path-separator? ( ch -- ? ) os windows? "/\\" "/" ? member? ;
 
 : path-separator ( -- string ) os windows? "\\" "/" ? ;
@@ -26,8 +24,6 @@ HOOK: root-directory? io-backend ( path -- ? )
 M: object root-directory? ( path -- ? )
     [ f ] [ [ path-separator? ] all? ] if-empty ;
 
-PRIVATE>
-
 ERROR: no-parent-directory path ;
 
 : parent-directory ( path -- parent )