rsc | 1821f77 | 2005-03-18 21:59:19 +0000 | [diff] [blame] | 1 | .TH NETFILES 1 |
rsc | 26d43ca | 2005-03-18 19:35:15 +0000 | [diff] [blame] | 2 | .SH NAME |
| 3 | Netfiles, netfileget, netfileput, netfilestat \- network file access inside acme |
| 4 | .SH SYNOPSIS |
| 5 | .B Netfiles |
| 6 | .PP |
| 7 | .B netfileget |
| 8 | [ |
| 9 | .B -d |
| 10 | ] |
| 11 | .I system |
| 12 | .I path |
| 13 | .PP |
| 14 | .B netfileput |
| 15 | .I system |
| 16 | .I path |
| 17 | .PP |
| 18 | .B netfilestat |
| 19 | .I system |
| 20 | .I path |
| 21 | .SH DESCRIPTION |
| 22 | .B Netfiles |
| 23 | presents remote file systems in |
| 24 | .IR acme (4) |
| 25 | windows. |
| 26 | Each window is named |
| 27 | .BI /n/ system / path |
| 28 | and displays the contents of |
| 29 | .I path |
| 30 | on |
| 31 | .IR system . |
| 32 | .PP |
| 33 | .I Netfiles |
| 34 | reads names of windows to create from the |
| 35 | plumbing channel |
| 36 | .B netfileedit |
| 37 | (see |
| 38 | .IR plumber (4) |
| 39 | and the example section below). |
| 40 | In a |
| 41 | .IR netfiles -controlled |
| 42 | window, |
| 43 | .BR Get , |
| 44 | .BR Put , |
| 45 | and |
| 46 | button 3 loads work as in normal acme windows. |
| 47 | External commands executed with button 2 |
| 48 | run in the directory in which |
| 49 | .I acme |
| 50 | was started. |
| 51 | .PP |
| 52 | .I Netfiles |
| 53 | uses the helper programs |
| 54 | .IR netfileget , |
| 55 | .IR netfileput , |
| 56 | and |
| 57 | .I netfilestat |
| 58 | to access the remote file systems. |
| 59 | The three first check to see if |
| 60 | .I system |
| 61 | is a service in the current name space |
| 62 | (see |
| 63 | .IR intro (4)). |
| 64 | If so, they use |
| 65 | .IR 9p (1) |
| 66 | to access it. |
| 67 | Otherwise, they assume that the system is a network name |
| 68 | and use |
| 69 | .IR ssh (1)'s |
| 70 | .I sftp |
| 71 | to access it. |
| 72 | .PP |
| 73 | .I Netfileget |
| 74 | prints the contents of the named |
| 75 | .I path |
| 76 | to standard output. |
| 77 | If the |
| 78 | .B -d |
| 79 | option is given, then |
| 80 | .I netfileget |
| 81 | prints a single-column listing of |
| 82 | .IR path , |
| 83 | which must be a directory. |
| 84 | Directories in the listing have |
| 85 | .L / |
| 86 | appended to their names. |
| 87 | .PP |
| 88 | .I Netfileput |
| 89 | writes its standard input to the named |
| 90 | .IR path . |
| 91 | .PP |
| 92 | .I Netfilestat |
| 93 | prints the file type of |
| 94 | .IR path , |
| 95 | one of |
| 96 | .BR nonexistent , |
| 97 | .BR directory , |
| 98 | or |
| 99 | .BR file . |
| 100 | .SH EXAMPLES |
| 101 | The following plumbing rule |
| 102 | (see |
| 103 | .IR plumb (7)) |
| 104 | passes |
| 105 | .B /n/ |
| 106 | paths to |
| 107 | .IR Netfiles , |
| 108 | starting it if necessary. |
| 109 | .IP |
| 110 | .EX |
| 111 | # /n/ paths go to simulator in acme |
| 112 | kind is text |
| 113 | data matches '[a-zA-Z0-9_\e-./]+('$addr')?' |
| 114 | data matches '(/n/[a-zA-Z0-9_\e-./]+)('$addr')?' |
| 115 | plumb to netfileedit |
| 116 | plumb client Netfiles |
| 117 | .EE |
| 118 | .SH SOURCE |
| 119 | .B \*9/src/cmd/netfiles |
| 120 | .SH SEE ALSO |
| 121 | .IR 9p (1), |
| 122 | .IR ssh (1), |
| 123 | .IR ssh-agent (1), |
| 124 | .IR intro (4), |
| 125 | .IR acme (4), |
| 126 | .IR factotum (4), |
| 127 | .HR http://v9fs.sf.net |