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