netfiles.1 (2257B)
1 .TH NETFILES 1 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 .MR 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 .MR 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 .MR intro (4) ). 64 If so, they use 65 .MR 9p (1) 66 to access it. 67 Otherwise, they assume that the system is a network name 68 and use 69 .MR 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 .MR 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 .MR 9p (1) , 122 .MR ssh (1) , 123 .MR ssh-agent (1) , 124 .MR intro (4) , 125 .MR acme (4) , 126 .MR factotum (4) , 127 .HR http://v9fs.sf.net 128 .SH BUGS 129 .I Netfiles 130 depends on 131 .MR sftpcache (1) , 132 which only works with OpenSSH versions 4.3 and earlier; 133 later versions do not print the 134 .B sftp> 135 prompt frequently enough.