Blob
1 .TH NETFILES 12 .SH NAME3 Netfiles, netfileget, netfileput, netfilestat \- network file access inside acme4 .SH SYNOPSIS5 .B Netfiles6 .PP7 .B netfileget8 [9 .B -d10 ]11 .I system12 .I path13 .PP14 .B netfileput15 .I system16 .I path17 .PP18 .B netfilestat19 .I system20 .I path21 .SH DESCRIPTION22 .B Netfiles23 presents remote file systems in24 .IR acme (4)25 windows.26 Each window is named27 .BI /n/ system / path28 and displays the contents of29 .I path30 on31 .IR system .32 .PP33 .I Netfiles34 reads names of windows to create from the35 plumbing channel36 .B netfileedit37 (see38 .IR plumber (4)39 and the example section below).40 In a41 .IR netfiles -controlled42 window,43 .BR Get ,44 .BR Put ,45 and46 button 3 loads work as in normal acme windows.47 External commands executed with button 248 run in the directory in which49 .I acme50 was started.51 .PP52 .I Netfiles53 uses the helper programs54 .IR netfileget ,55 .IR netfileput ,56 and57 .I netfilestat58 to access the remote file systems.59 The three first check to see if60 .I system61 is a service in the current name space62 (see63 .IR intro (4)).64 If so, they use65 .IR 9p (1)66 to access it.67 Otherwise, they assume that the system is a network name68 and use69 .IR ssh (1)'s70 .I sftp71 to access it.72 .PP73 .I Netfileget74 prints the contents of the named75 .I path76 to standard output.77 If the78 .B -d79 option is given, then80 .I netfileget81 prints a single-column listing of82 .IR path ,83 which must be a directory.84 Directories in the listing have85 .L /86 appended to their names.87 .PP88 .I Netfileput89 writes its standard input to the named90 .IR path .91 .PP92 .I Netfilestat93 prints the file type of94 .IR path ,95 one of96 .BR nonexistent ,97 .BR directory ,98 or99 .BR file .100 .SH EXAMPLES101 The following plumbing rule102 (see103 .IR plumb (7))104 passes105 .B /n/106 paths to107 .IR Netfiles ,108 starting it if necessary.109 .IP110 .EX111 # /n/ paths go to simulator in acme112 kind is text113 data matches '[a-zA-Z0-9_\e-./]+('$addr')?'114 data matches '(/n/[a-zA-Z0-9_\e-./]+)('$addr')?'115 plumb to netfileedit116 plumb client Netfiles117 .EE118 .SH SOURCE119 .B \*9/src/cmd/netfiles120 .SH SEE ALSO121 .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