source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/fs/FileUtil.html @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 51.9 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0_07) on Tue Sep 01 20:56:50 UTC 2009 -->
6<TITLE>
7FileUtil (Hadoop 0.20.1 API)
8</TITLE>
9
10<META NAME="date" CONTENT="2009-09-01">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="FileUtil (Hadoop 0.20.1 API)";
19    }
20}
21</SCRIPT>
22<NOSCRIPT>
23</NOSCRIPT>
24
25</HEAD>
26
27<BODY BGCOLOR="white" onload="windowTitle();">
28<HR>
29
30
31<!-- ========= START OF TOP NAVBAR ======= -->
32<A NAME="navbar_top"><!-- --></A>
33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35<TR>
36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37<A NAME="navbar_top_firstrow"><!-- --></A>
38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39  <TR ALIGN="center" VALIGN="top">
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/FileUtil.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48  </TR>
49</TABLE>
50</TD>
51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;<A HREF="../../../../org/apache/hadoop/fs/FileSystem.Statistics.html" title="class in org.apache.hadoop.fs"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../org/apache/hadoop/fs/FileUtil.HardLink.html" title="class in org.apache.hadoop.fs"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../index.html?org/apache/hadoop/fs/FileUtil.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="FileUtil.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<SCRIPT type="text/javascript">
64  <!--
65  if(window==top) {
66    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67  }
68  //-->
69</SCRIPT>
70<NOSCRIPT>
71  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
72</NOSCRIPT>
73
74
75</FONT></TD>
76</TR>
77<TR>
78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91org.apache.hadoop.fs</FONT>
92<BR>
93Class FileUtil</H2>
94<PRE>
95<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
96  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.fs.FileUtil</B>
97</PRE>
98<HR>
99<DL>
100<DT><PRE>public class <B>FileUtil</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
101</PRE>
102
103<P>
104A collection of file-processing util methods
105<P>
106
107<P>
108<HR>
109
110<P>
111<!-- ======== NESTED CLASS SUMMARY ======== -->
112
113<A NAME="nested_class_summary"><!-- --></A>
114<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
115<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
116<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
117<B>Nested Class Summary</B></FONT></TH>
118</TR>
119<TR BGCOLOR="white" CLASS="TableRowColor">
120<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
121<CODE>static&nbsp;class</CODE></FONT></TD>
122<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.HardLink.html" title="class in org.apache.hadoop.fs">FileUtil.HardLink</A></B></CODE>
123
124<BR>
125&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Class for creating hardlinks.</TD>
126</TR>
127</TABLE>
128&nbsp;
129<!-- ======== CONSTRUCTOR SUMMARY ======== -->
130
131<A NAME="constructor_summary"><!-- --></A>
132<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
133<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
134<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
135<B>Constructor Summary</B></FONT></TH>
136</TR>
137<TR BGCOLOR="white" CLASS="TableRowColor">
138<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#FileUtil()">FileUtil</A></B>()</CODE>
139
140<BR>
141&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
142</TR>
143</TABLE>
144&nbsp;
145<!-- ========== METHOD SUMMARY =========== -->
146
147<A NAME="method_summary"><!-- --></A>
148<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
149<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
150<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
151<B>Method Summary</B></FONT></TH>
152</TR>
153<TR BGCOLOR="white" CLASS="TableRowColor">
154<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
155<CODE>static&nbsp;int</CODE></FONT></TD>
156<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#chmod(java.lang.String, java.lang.String)">chmod</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;filename,
157      <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;perm)</CODE>
158
159<BR>
160&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Change the permissions on a filename.</TD>
161</TR>
162<TR BGCOLOR="white" CLASS="TableRowColor">
163<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
164<CODE>static&nbsp;boolean</CODE></FONT></TD>
165<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#copy(java.io.File, org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, boolean, org.apache.hadoop.conf.Configuration)">copy</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;src,
166     <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;dstFS,
167     <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;dst,
168     boolean&nbsp;deleteSource,
169     <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
170
171<BR>
172&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copy local files to a FileSystem.</TD>
173</TR>
174<TR BGCOLOR="white" CLASS="TableRowColor">
175<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176<CODE>static&nbsp;boolean</CODE></FONT></TD>
177<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#copy(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path[], org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, boolean, boolean, org.apache.hadoop.conf.Configuration)">copy</A></B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;srcFS,
178     <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>[]&nbsp;srcs,
179     <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;dstFS,
180     <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;dst,
181     boolean&nbsp;deleteSource,
182     boolean&nbsp;overwrite,
183     <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
184
185<BR>
186&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
187</TR>
188<TR BGCOLOR="white" CLASS="TableRowColor">
189<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
190<CODE>static&nbsp;boolean</CODE></FONT></TD>
191<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#copy(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, java.io.File, boolean, org.apache.hadoop.conf.Configuration)">copy</A></B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;srcFS,
192     <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;src,
193     <A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;dst,
194     boolean&nbsp;deleteSource,
195     <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
196
197<BR>
198&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copy FileSystem files to local files.</TD>
199</TR>
200<TR BGCOLOR="white" CLASS="TableRowColor">
201<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
202<CODE>static&nbsp;boolean</CODE></FONT></TD>
203<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#copy(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, boolean, boolean, org.apache.hadoop.conf.Configuration)">copy</A></B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;srcFS,
204     <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;src,
205     <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;dstFS,
206     <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;dst,
207     boolean&nbsp;deleteSource,
208     boolean&nbsp;overwrite,
209     <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
210
211<BR>
212&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copy files between FileSystems.</TD>
213</TR>
214<TR BGCOLOR="white" CLASS="TableRowColor">
215<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
216<CODE>static&nbsp;boolean</CODE></FONT></TD>
217<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#copy(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, boolean, org.apache.hadoop.conf.Configuration)">copy</A></B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;srcFS,
218     <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;src,
219     <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;dstFS,
220     <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;dst,
221     boolean&nbsp;deleteSource,
222     <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
223
224<BR>
225&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copy files between FileSystems.</TD>
226</TR>
227<TR BGCOLOR="white" CLASS="TableRowColor">
228<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
229<CODE>static&nbsp;boolean</CODE></FONT></TD>
230<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#copyMerge(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, boolean, org.apache.hadoop.conf.Configuration, java.lang.String)">copyMerge</A></B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;srcFS,
231          <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;srcDir,
232          <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;dstFS,
233          <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;dstFile,
234          boolean&nbsp;deleteSource,
235          <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
236          <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;addString)</CODE>
237
238<BR>
239&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copy all files in a directory to one output file (merge).</TD>
240</TR>
241<TR BGCOLOR="white" CLASS="TableRowColor">
242<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
243<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A></CODE></FONT></TD>
244<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#createLocalTempFile(java.io.File, java.lang.String, boolean)">createLocalTempFile</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;basefile,
245                    <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;prefix,
246                    boolean&nbsp;isDeleteOnExit)</CODE>
247
248<BR>
249&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a tmp file for a base file.</TD>
250</TR>
251<TR BGCOLOR="white" CLASS="TableRowColor">
252<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
253<CODE>static&nbsp;boolean</CODE></FONT></TD>
254<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#fullyDelete(java.io.File)">fullyDelete</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;dir)</CODE>
255
256<BR>
257&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete a directory and all its contents.</TD>
258</TR>
259<TR BGCOLOR="white" CLASS="TableRowColor">
260<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
261<CODE>static&nbsp;void</CODE></FONT></TD>
262<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#fullyDelete(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path)">fullyDelete</A></B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;fs,
263            <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;dir)</CODE>
264
265<BR>
266&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html#delete(org.apache.hadoop.fs.Path, boolean)"><CODE>FileSystem.delete(Path, boolean)</CODE></A></I></TD>
267</TR>
268<TR BGCOLOR="white" CLASS="TableRowColor">
269<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
270<CODE>static&nbsp;long</CODE></FONT></TD>
271<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#getDU(java.io.File)">getDU</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;dir)</CODE>
272
273<BR>
274&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Takes an input dir and returns the du on that local directory.</TD>
275</TR>
276<TR BGCOLOR="white" CLASS="TableRowColor">
277<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
278<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
279<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#makeShellPath(java.io.File)">makeShellPath</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;file)</CODE>
280
281<BR>
282&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert a os-native filename to a path that works for the shell.</TD>
283</TR>
284<TR BGCOLOR="white" CLASS="TableRowColor">
285<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
286<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
287<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#makeShellPath(java.io.File, boolean)">makeShellPath</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;file,
288              boolean&nbsp;makeCanonicalPath)</CODE>
289
290<BR>
291&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert a os-native filename to a path that works for the shell.</TD>
292</TR>
293<TR BGCOLOR="white" CLASS="TableRowColor">
294<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
295<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
296<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#makeShellPath(java.lang.String)">makeShellPath</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;filename)</CODE>
297
298<BR>
299&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert a os-native filename to a path that works for the shell.</TD>
300</TR>
301<TR BGCOLOR="white" CLASS="TableRowColor">
302<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
303<CODE>static&nbsp;void</CODE></FONT></TD>
304<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#replaceFile(java.io.File, java.io.File)">replaceFile</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;src,
305            <A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;target)</CODE>
306
307<BR>
308&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Move the src file to the name specified by target.</TD>
309</TR>
310<TR BGCOLOR="white" CLASS="TableRowColor">
311<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
312<CODE>static&nbsp;<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>[]</CODE></FONT></TD>
313<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#stat2Paths(org.apache.hadoop.fs.FileStatus[])">stat2Paths</A></B>(<A HREF="../../../../org/apache/hadoop/fs/FileStatus.html" title="class in org.apache.hadoop.fs">FileStatus</A>[]&nbsp;stats)</CODE>
314
315<BR>
316&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;convert an array of FileStatus to an array of Path</TD>
317</TR>
318<TR BGCOLOR="white" CLASS="TableRowColor">
319<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
320<CODE>static&nbsp;<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>[]</CODE></FONT></TD>
321<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#stat2Paths(org.apache.hadoop.fs.FileStatus[], org.apache.hadoop.fs.Path)">stat2Paths</A></B>(<A HREF="../../../../org/apache/hadoop/fs/FileStatus.html" title="class in org.apache.hadoop.fs">FileStatus</A>[]&nbsp;stats,
322           <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;path)</CODE>
323
324<BR>
325&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;convert an array of FileStatus to an array of Path.</TD>
326</TR>
327<TR BGCOLOR="white" CLASS="TableRowColor">
328<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
329<CODE>static&nbsp;int</CODE></FONT></TD>
330<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#symLink(java.lang.String, java.lang.String)">symLink</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;target,
331        <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;linkname)</CODE>
332
333<BR>
334&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a soft link between a src and destination
335 only on a local disk.</TD>
336</TR>
337<TR BGCOLOR="white" CLASS="TableRowColor">
338<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
339<CODE>static&nbsp;void</CODE></FONT></TD>
340<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#unTar(java.io.File, java.io.File)">unTar</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;inFile,
341      <A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;untarDir)</CODE>
342
343<BR>
344&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Given a Tar File as input it will untar the file in a the untar directory
345 passed as the second parameter
346 
347 This utility will untar ".tar" files and ".tar.gz","tgz" files.</TD>
348</TR>
349<TR BGCOLOR="white" CLASS="TableRowColor">
350<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
351<CODE>static&nbsp;void</CODE></FONT></TD>
352<TD><CODE><B><A HREF="../../../../org/apache/hadoop/fs/FileUtil.html#unZip(java.io.File, java.io.File)">unZip</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;inFile,
353      <A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;unzipDir)</CODE>
354
355<BR>
356&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Given a File input it will unzip the file in a the unzip directory
357 passed as the second parameter</TD>
358</TR>
359</TABLE>
360&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
361<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
362<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
363<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
364</TR>
365<TR BGCOLOR="white" CLASS="TableRowColor">
366<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
367</TR>
368</TABLE>
369&nbsp;
370<P>
371
372<!-- ========= CONSTRUCTOR DETAIL ======== -->
373
374<A NAME="constructor_detail"><!-- --></A>
375<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
376<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
377<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
378<B>Constructor Detail</B></FONT></TH>
379</TR>
380</TABLE>
381
382<A NAME="FileUtil()"><!-- --></A><H3>
383FileUtil</H3>
384<PRE>
385public <B>FileUtil</B>()</PRE>
386<DL>
387</DL>
388
389<!-- ============ METHOD DETAIL ========== -->
390
391<A NAME="method_detail"><!-- --></A>
392<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
393<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
394<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
395<B>Method Detail</B></FONT></TH>
396</TR>
397</TABLE>
398
399<A NAME="stat2Paths(org.apache.hadoop.fs.FileStatus[])"><!-- --></A><H3>
400stat2Paths</H3>
401<PRE>
402public static <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>[] <B>stat2Paths</B>(<A HREF="../../../../org/apache/hadoop/fs/FileStatus.html" title="class in org.apache.hadoop.fs">FileStatus</A>[]&nbsp;stats)</PRE>
403<DL>
404<DD>convert an array of FileStatus to an array of Path
405<P>
406<DD><DL>
407<DT><B>Parameters:</B><DD><CODE>stats</CODE> - an array of FileStatus objects
408<DT><B>Returns:</B><DD>an array of paths corresponding to the input</DL>
409</DD>
410</DL>
411<HR>
412
413<A NAME="stat2Paths(org.apache.hadoop.fs.FileStatus[], org.apache.hadoop.fs.Path)"><!-- --></A><H3>
414stat2Paths</H3>
415<PRE>
416public static <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>[] <B>stat2Paths</B>(<A HREF="../../../../org/apache/hadoop/fs/FileStatus.html" title="class in org.apache.hadoop.fs">FileStatus</A>[]&nbsp;stats,
417                                <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;path)</PRE>
418<DL>
419<DD>convert an array of FileStatus to an array of Path.
420 If stats if null, return path
421<P>
422<DD><DL>
423<DT><B>Parameters:</B><DD><CODE>stats</CODE> - an array of FileStatus objects<DD><CODE>path</CODE> - default path to return in stats is null
424<DT><B>Returns:</B><DD>an array of paths corresponding to the input</DL>
425</DD>
426</DL>
427<HR>
428
429<A NAME="fullyDelete(java.io.File)"><!-- --></A><H3>
430fullyDelete</H3>
431<PRE>
432public static boolean <B>fullyDelete</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;dir)
433                           throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
434<DL>
435<DD>Delete a directory and all its contents.  If
436 we return false, the directory may be partially-deleted.
437<P>
438<DD><DL>
439
440<DT><B>Throws:</B>
441<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
442</DD>
443</DL>
444<HR>
445
446<A NAME="fullyDelete(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path)"><!-- --></A><H3>
447fullyDelete</H3>
448<PRE>
449<FONT SIZE="-1"><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</A>
450</FONT>public static void <B>fullyDelete</B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;fs,
451                                          <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;dir)
452                        throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
453<DL>
454<DD><B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html#delete(org.apache.hadoop.fs.Path, boolean)"><CODE>FileSystem.delete(Path, boolean)</CODE></A></I>
455<P>
456<DD>Recursively delete a directory.
457<P>
458<DD><DL>
459<DT><B>Parameters:</B><DD><CODE>fs</CODE> - <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs"><CODE>FileSystem</CODE></A> on which the path is present<DD><CODE>dir</CODE> - directory to recursively delete
460<DT><B>Throws:</B>
461<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
462</DD>
463</DL>
464<HR>
465
466<A NAME="copy(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, boolean, org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
467copy</H3>
468<PRE>
469public static boolean <B>copy</B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;srcFS,
470                           <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;src,
471                           <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;dstFS,
472                           <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;dst,
473                           boolean&nbsp;deleteSource,
474                           <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)
475                    throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
476<DL>
477<DD>Copy files between FileSystems.
478<P>
479<DD><DL>
480
481<DT><B>Throws:</B>
482<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
483</DD>
484</DL>
485<HR>
486
487<A NAME="copy(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path[], org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, boolean, boolean, org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
488copy</H3>
489<PRE>
490public static boolean <B>copy</B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;srcFS,
491                           <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>[]&nbsp;srcs,
492                           <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;dstFS,
493                           <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;dst,
494                           boolean&nbsp;deleteSource,
495                           boolean&nbsp;overwrite,
496                           <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)
497                    throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
498<DL>
499<DD><DL>
500
501<DT><B>Throws:</B>
502<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
503</DD>
504</DL>
505<HR>
506
507<A NAME="copy(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, boolean, boolean, org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
508copy</H3>
509<PRE>
510public static boolean <B>copy</B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;srcFS,
511                           <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;src,
512                           <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;dstFS,
513                           <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;dst,
514                           boolean&nbsp;deleteSource,
515                           boolean&nbsp;overwrite,
516                           <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)
517                    throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
518<DL>
519<DD>Copy files between FileSystems.
520<P>
521<DD><DL>
522
523<DT><B>Throws:</B>
524<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
525</DD>
526</DL>
527<HR>
528
529<A NAME="copyMerge(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, boolean, org.apache.hadoop.conf.Configuration, java.lang.String)"><!-- --></A><H3>
530copyMerge</H3>
531<PRE>
532public static boolean <B>copyMerge</B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;srcFS,
533                                <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;srcDir,
534                                <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;dstFS,
535                                <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;dstFile,
536                                boolean&nbsp;deleteSource,
537                                <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
538                                <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;addString)
539                         throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
540<DL>
541<DD>Copy all files in a directory to one output file (merge).
542<P>
543<DD><DL>
544
545<DT><B>Throws:</B>
546<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
547</DD>
548</DL>
549<HR>
550
551<A NAME="copy(java.io.File, org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, boolean, org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
552copy</H3>
553<PRE>
554public static boolean <B>copy</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;src,
555                           <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;dstFS,
556                           <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;dst,
557                           boolean&nbsp;deleteSource,
558                           <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)
559                    throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
560<DL>
561<DD>Copy local files to a FileSystem.
562<P>
563<DD><DL>
564
565<DT><B>Throws:</B>
566<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
567</DD>
568</DL>
569<HR>
570
571<A NAME="copy(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, java.io.File, boolean, org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
572copy</H3>
573<PRE>
574public static boolean <B>copy</B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;srcFS,
575                           <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;src,
576                           <A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;dst,
577                           boolean&nbsp;deleteSource,
578                           <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)
579                    throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
580<DL>
581<DD>Copy FileSystem files to local files.
582<P>
583<DD><DL>
584
585<DT><B>Throws:</B>
586<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
587</DD>
588</DL>
589<HR>
590
591<A NAME="makeShellPath(java.lang.String)"><!-- --></A><H3>
592makeShellPath</H3>
593<PRE>
594public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>makeShellPath</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;filename)
595                            throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
596<DL>
597<DD>Convert a os-native filename to a path that works for the shell.
598<P>
599<DD><DL>
600<DT><B>Parameters:</B><DD><CODE>filename</CODE> - The filename to convert
601<DT><B>Returns:</B><DD>The unix pathname
602<DT><B>Throws:</B>
603<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - on windows, there can be problems with the subprocess</DL>
604</DD>
605</DL>
606<HR>
607
608<A NAME="makeShellPath(java.io.File)"><!-- --></A><H3>
609makeShellPath</H3>
610<PRE>
611public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>makeShellPath</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;file)
612                            throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
613<DL>
614<DD>Convert a os-native filename to a path that works for the shell.
615<P>
616<DD><DL>
617<DT><B>Parameters:</B><DD><CODE>file</CODE> - The filename to convert
618<DT><B>Returns:</B><DD>The unix pathname
619<DT><B>Throws:</B>
620<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - on windows, there can be problems with the subprocess</DL>
621</DD>
622</DL>
623<HR>
624
625<A NAME="makeShellPath(java.io.File, boolean)"><!-- --></A><H3>
626makeShellPath</H3>
627<PRE>
628public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>makeShellPath</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;file,
629                                   boolean&nbsp;makeCanonicalPath)
630                            throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
631<DL>
632<DD>Convert a os-native filename to a path that works for the shell.
633<P>
634<DD><DL>
635<DT><B>Parameters:</B><DD><CODE>file</CODE> - The filename to convert<DD><CODE>makeCanonicalPath</CODE> - Whether to make canonical path for the file passed
636<DT><B>Returns:</B><DD>The unix pathname
637<DT><B>Throws:</B>
638<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - on windows, there can be problems with the subprocess</DL>
639</DD>
640</DL>
641<HR>
642
643<A NAME="getDU(java.io.File)"><!-- --></A><H3>
644getDU</H3>
645<PRE>
646public static long <B>getDU</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;dir)</PRE>
647<DL>
648<DD>Takes an input dir and returns the du on that local directory. Very basic
649 implementation.
650<P>
651<DD><DL>
652<DT><B>Parameters:</B><DD><CODE>dir</CODE> - The input dir to get the disk space of this local dir
653<DT><B>Returns:</B><DD>The total disk space of the input local directory</DL>
654</DD>
655</DL>
656<HR>
657
658<A NAME="unZip(java.io.File, java.io.File)"><!-- --></A><H3>
659unZip</H3>
660<PRE>
661public static void <B>unZip</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;inFile,
662                         <A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;unzipDir)
663                  throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
664<DL>
665<DD>Given a File input it will unzip the file in a the unzip directory
666 passed as the second parameter
667<P>
668<DD><DL>
669<DT><B>Parameters:</B><DD><CODE>inFile</CODE> - The zip file as input<DD><CODE>unzipDir</CODE> - The unzip directory where to unzip the zip file.
670<DT><B>Throws:</B>
671<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
672</DD>
673</DL>
674<HR>
675
676<A NAME="unTar(java.io.File, java.io.File)"><!-- --></A><H3>
677unTar</H3>
678<PRE>
679public static void <B>unTar</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;inFile,
680                         <A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;untarDir)
681                  throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
682<DL>
683<DD>Given a Tar File as input it will untar the file in a the untar directory
684 passed as the second parameter
685 
686 This utility will untar ".tar" files and ".tar.gz","tgz" files.
687<P>
688<DD><DL>
689<DT><B>Parameters:</B><DD><CODE>inFile</CODE> - The tar file as input.<DD><CODE>untarDir</CODE> - The untar directory where to untar the tar file.
690<DT><B>Throws:</B>
691<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
692</DD>
693</DL>
694<HR>
695
696<A NAME="symLink(java.lang.String, java.lang.String)"><!-- --></A><H3>
697symLink</H3>
698<PRE>
699public static int <B>symLink</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;target,
700                          <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;linkname)
701                   throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
702<DL>
703<DD>Create a soft link between a src and destination
704 only on a local disk. HDFS does not support this
705<P>
706<DD><DL>
707<DT><B>Parameters:</B><DD><CODE>target</CODE> - the target for symlink<DD><CODE>linkname</CODE> - the symlink
708<DT><B>Returns:</B><DD>value returned by the command
709<DT><B>Throws:</B>
710<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
711</DD>
712</DL>
713<HR>
714
715<A NAME="chmod(java.lang.String, java.lang.String)"><!-- --></A><H3>
716chmod</H3>
717<PRE>
718public static int <B>chmod</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;filename,
719                        <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;perm)
720                 throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A>,
721                        <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</A></PRE>
722<DL>
723<DD>Change the permissions on a filename.
724<P>
725<DD><DL>
726<DT><B>Parameters:</B><DD><CODE>filename</CODE> - the name of the file to change<DD><CODE>perm</CODE> - the permission string
727<DT><B>Returns:</B><DD>the exit code from the command
728<DT><B>Throws:</B>
729<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE>
730<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</A></CODE></DL>
731</DD>
732</DL>
733<HR>
734
735<A NAME="createLocalTempFile(java.io.File, java.lang.String, boolean)"><!-- --></A><H3>
736createLocalTempFile</H3>
737<PRE>
738public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A> <B>createLocalTempFile</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;basefile,
739                                             <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;prefix,
740                                             boolean&nbsp;isDeleteOnExit)
741                                      throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
742<DL>
743<DD>Create a tmp file for a base file.
744<P>
745<DD><DL>
746<DT><B>Parameters:</B><DD><CODE>basefile</CODE> - the base file of the tmp<DD><CODE>prefix</CODE> - file name prefix of tmp<DD><CODE>isDeleteOnExit</CODE> - if true, the tmp will be deleted when the VM exits
747<DT><B>Returns:</B><DD>a newly created tmp file
748<DT><B>Throws:</B>
749<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - If a tmp file cannot created<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true#createTempFile(java.lang.String, java.lang.String, java.io.File)" title="class or interface in java.io"><CODE>File.createTempFile(String, String, File)</CODE></A>,
750<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true#deleteOnExit()" title="class or interface in java.io"><CODE>File.deleteOnExit()</CODE></A></DL>
751</DD>
752</DL>
753<HR>
754
755<A NAME="replaceFile(java.io.File, java.io.File)"><!-- --></A><H3>
756replaceFile</H3>
757<PRE>
758public static void <B>replaceFile</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;src,
759                               <A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;target)
760                        throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
761<DL>
762<DD>Move the src file to the name specified by target.
763<P>
764<DD><DL>
765<DT><B>Parameters:</B><DD><CODE>src</CODE> - the source file<DD><CODE>target</CODE> - the target file
766<DT><B>Throws:</B>
767<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - If this operation fails</DL>
768</DD>
769</DL>
770<!-- ========= END OF CLASS DATA ========= -->
771<HR>
772
773
774<!-- ======= START OF BOTTOM NAVBAR ====== -->
775<A NAME="navbar_bottom"><!-- --></A>
776<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
777<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
778<TR>
779<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
780<A NAME="navbar_bottom_firstrow"><!-- --></A>
781<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
782  <TR ALIGN="center" VALIGN="top">
783  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
784  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
785  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
786  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/FileUtil.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
787  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
788  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
789  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
790  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
791  </TR>
792</TABLE>
793</TD>
794<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
795</EM>
796</TD>
797</TR>
798
799<TR>
800<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
801&nbsp;<A HREF="../../../../org/apache/hadoop/fs/FileSystem.Statistics.html" title="class in org.apache.hadoop.fs"><B>PREV CLASS</B></A>&nbsp;
802&nbsp;<A HREF="../../../../org/apache/hadoop/fs/FileUtil.HardLink.html" title="class in org.apache.hadoop.fs"><B>NEXT CLASS</B></A></FONT></TD>
803<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
804  <A HREF="../../../../index.html?org/apache/hadoop/fs/FileUtil.html" target="_top"><B>FRAMES</B></A>  &nbsp;
805&nbsp;<A HREF="FileUtil.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
806&nbsp;<SCRIPT type="text/javascript">
807  <!--
808  if(window==top) {
809    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
810  }
811  //-->
812</SCRIPT>
813<NOSCRIPT>
814  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
815</NOSCRIPT>
816
817
818</FONT></TD>
819</TR>
820<TR>
821<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
822  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
823<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
824DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
825</TR>
826</TABLE>
827<A NAME="skip-navbar_bottom"></A>
828<!-- ======== END OF BOTTOM NAVBAR ======= -->
829
830<HR>
831Copyright &copy; 2009 The Apache Software Foundation
832</BODY>
833</HTML>
Note: See TracBrowser for help on using the repository browser.