FileUtils.html 289 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="de">
  4. <head>
  5. <!-- Generated by javadoc -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  7. <title>FileUtils (Apache Commons IO 2.6 API)</title>
  8. <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
  9. <script type="text/javascript" src="../../../../script.js"></script>
  10. </head>
  11. <body>
  12. <script type="text/javascript"><!--
  13. try {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="FileUtils (Apache Commons IO 2.6 API)";
  16. }
  17. }
  18. catch(err) {
  19. }
  20. //-->
  21. var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9,"i42":9,"i43":9,"i44":9,"i45":9,"i46":9,"i47":9,"i48":9,"i49":9,"i50":9,"i51":9,"i52":9,"i53":9,"i54":9,"i55":9,"i56":9,"i57":9,"i58":9,"i59":9,"i60":9,"i61":41,"i62":9,"i63":9,"i64":41,"i65":9,"i66":9,"i67":9,"i68":9,"i69":9,"i70":9,"i71":9,"i72":9,"i73":9,"i74":9,"i75":9,"i76":41,"i77":41,"i78":9,"i79":9,"i80":9,"i81":9,"i82":9,"i83":9,"i84":9,"i85":9,"i86":9,"i87":9,"i88":9,"i89":9,"i90":9,"i91":9,"i92":9,"i93":9,"i94":41,"i95":41,"i96":9,"i97":9,"i98":9,"i99":9};
  22. var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
  23. var altColor = "altColor";
  24. var rowColor = "rowColor";
  25. var tableTab = "tableTab";
  26. var activeTableTab = "activeTableTab";
  27. </script>
  28. <noscript>
  29. <div>JavaScript is disabled on your browser.</div>
  30. </noscript>
  31. <!-- ========= START OF TOP NAVBAR ======= -->
  32. <div class="topNav"><a name="navbar.top">
  33. <!-- -->
  34. </a>
  35. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  36. <a name="navbar.top.firstrow">
  37. <!-- -->
  38. </a>
  39. <ul class="navList" title="Navigation">
  40. <li><a href="../../../../overview-summary.html">Overview</a></li>
  41. <li><a href="package-summary.html">Package</a></li>
  42. <li class="navBarCell1Rev">Class</li>
  43. <li><a href="class-use/FileUtils.html">Use</a></li>
  44. <li><a href="package-tree.html">Tree</a></li>
  45. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  46. <li><a href="../../../../index-all.html">Index</a></li>
  47. <li><a href="../../../../help-doc.html">Help</a></li>
  48. </ul>
  49. </div>
  50. <div class="subNav">
  51. <ul class="navList">
  52. <li><a href="../../../../org/apache/commons/io/FileSystemUtils.html" title="class in org.apache.commons.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  53. <li><a href="../../../../org/apache/commons/io/HexDump.html" title="class in org.apache.commons.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  54. </ul>
  55. <ul class="navList">
  56. <li><a href="../../../../index.html?org/apache/commons/io/FileUtils.html" target="_top">Frames</a></li>
  57. <li><a href="FileUtils.html" target="_top">No&nbsp;Frames</a></li>
  58. </ul>
  59. <ul class="navList" id="allclasses_navbar_top">
  60. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  61. </ul>
  62. <div>
  63. <script type="text/javascript"><!--
  64. allClassesLink = document.getElementById("allclasses_navbar_top");
  65. if(window==top) {
  66. allClassesLink.style.display = "block";
  67. }
  68. else {
  69. allClassesLink.style.display = "none";
  70. }
  71. //-->
  72. </script>
  73. </div>
  74. <div>
  75. <ul class="subNavList">
  76. <li>Summary:&nbsp;</li>
  77. <li>Nested&nbsp;|&nbsp;</li>
  78. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  79. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  80. <li><a href="#method.summary">Method</a></li>
  81. </ul>
  82. <ul class="subNavList">
  83. <li>Detail:&nbsp;</li>
  84. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  85. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  86. <li><a href="#method.detail">Method</a></li>
  87. </ul>
  88. </div>
  89. <a name="skip.navbar.top">
  90. <!-- -->
  91. </a></div>
  92. <!-- ========= END OF TOP NAVBAR ========= -->
  93. <!-- ======== START OF CLASS DATA ======== -->
  94. <div class="header">
  95. <div class="subTitle">org.apache.commons.io</div>
  96. <h2 title="Class FileUtils" class="title">Class FileUtils</h2>
  97. </div>
  98. <div class="contentContainer">
  99. <ul class="inheritance">
  100. <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
  101. <li>
  102. <ul class="inheritance">
  103. <li>org.apache.commons.io.FileUtils</li>
  104. </ul>
  105. </li>
  106. </ul>
  107. <div class="description">
  108. <ul class="blockList">
  109. <li class="blockList">
  110. <hr>
  111. <br>
  112. <pre>public class <span class="typeNameLabel">FileUtils</span>
  113. extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
  114. <div class="block">General file manipulation utilities.
  115. <p>
  116. Facilities are provided in the following areas:
  117. <ul>
  118. <li>writing to a file
  119. <li>reading from a file
  120. <li>make a directory including parent directories
  121. <li>copying files and directories
  122. <li>deleting files and directories
  123. <li>converting to and from a URL
  124. <li>listing files and directories by filter and extension
  125. <li>comparing file content
  126. <li>file last changed date
  127. <li>calculating a checksum
  128. </ul>
  129. <p>
  130. Note that a specific charset should be specified whenever possible.
  131. Relying on the platform default means that the code is Locale-dependent.
  132. Only use the default if the files are known to always use the platform default.
  133. <p>
  134. Origin of code: Excalibur, Alexandria, Commons-Utils</div>
  135. </li>
  136. </ul>
  137. </div>
  138. <div class="summary">
  139. <ul class="blockList">
  140. <li class="blockList">
  141. <!-- =========== FIELD SUMMARY =========== -->
  142. <ul class="blockList">
  143. <li class="blockList"><a name="field.summary">
  144. <!-- -->
  145. </a>
  146. <h3>Field Summary</h3>
  147. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
  148. <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
  149. <tr>
  150. <th class="colFirst" scope="col">Modifier and Type</th>
  151. <th class="colLast" scope="col">Field and Description</th>
  152. </tr>
  153. <tr class="altColor">
  154. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>[]</code></td>
  155. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#EMPTY_FILE_ARRAY">EMPTY_FILE_ARRAY</a></span></code>
  156. <div class="block">An empty array of type <code>File</code>.</div>
  157. </td>
  158. </tr>
  159. <tr class="rowColor">
  160. <td class="colFirst"><code>static long</code></td>
  161. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#ONE_EB">ONE_EB</a></span></code>
  162. <div class="block">The number of bytes in an exabyte.</div>
  163. </td>
  164. </tr>
  165. <tr class="altColor">
  166. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a></code></td>
  167. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#ONE_EB_BI">ONE_EB_BI</a></span></code>
  168. <div class="block">The number of bytes in an exabyte.</div>
  169. </td>
  170. </tr>
  171. <tr class="rowColor">
  172. <td class="colFirst"><code>static long</code></td>
  173. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#ONE_GB">ONE_GB</a></span></code>
  174. <div class="block">The number of bytes in a gigabyte.</div>
  175. </td>
  176. </tr>
  177. <tr class="altColor">
  178. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a></code></td>
  179. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#ONE_GB_BI">ONE_GB_BI</a></span></code>
  180. <div class="block">The number of bytes in a gigabyte.</div>
  181. </td>
  182. </tr>
  183. <tr class="rowColor">
  184. <td class="colFirst"><code>static long</code></td>
  185. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#ONE_KB">ONE_KB</a></span></code>
  186. <div class="block">The number of bytes in a kilobyte.</div>
  187. </td>
  188. </tr>
  189. <tr class="altColor">
  190. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a></code></td>
  191. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#ONE_KB_BI">ONE_KB_BI</a></span></code>
  192. <div class="block">The number of bytes in a kilobyte.</div>
  193. </td>
  194. </tr>
  195. <tr class="rowColor">
  196. <td class="colFirst"><code>static long</code></td>
  197. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#ONE_MB">ONE_MB</a></span></code>
  198. <div class="block">The number of bytes in a megabyte.</div>
  199. </td>
  200. </tr>
  201. <tr class="altColor">
  202. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a></code></td>
  203. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#ONE_MB_BI">ONE_MB_BI</a></span></code>
  204. <div class="block">The number of bytes in a megabyte.</div>
  205. </td>
  206. </tr>
  207. <tr class="rowColor">
  208. <td class="colFirst"><code>static long</code></td>
  209. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#ONE_PB">ONE_PB</a></span></code>
  210. <div class="block">The number of bytes in a petabyte.</div>
  211. </td>
  212. </tr>
  213. <tr class="altColor">
  214. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a></code></td>
  215. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#ONE_PB_BI">ONE_PB_BI</a></span></code>
  216. <div class="block">The number of bytes in a petabyte.</div>
  217. </td>
  218. </tr>
  219. <tr class="rowColor">
  220. <td class="colFirst"><code>static long</code></td>
  221. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#ONE_TB">ONE_TB</a></span></code>
  222. <div class="block">The number of bytes in a terabyte.</div>
  223. </td>
  224. </tr>
  225. <tr class="altColor">
  226. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a></code></td>
  227. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#ONE_TB_BI">ONE_TB_BI</a></span></code>
  228. <div class="block">The number of bytes in a terabyte.</div>
  229. </td>
  230. </tr>
  231. <tr class="rowColor">
  232. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a></code></td>
  233. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#ONE_YB">ONE_YB</a></span></code>
  234. <div class="block">The number of bytes in a yottabyte.</div>
  235. </td>
  236. </tr>
  237. <tr class="altColor">
  238. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a></code></td>
  239. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#ONE_ZB">ONE_ZB</a></span></code>
  240. <div class="block">The number of bytes in a zettabyte.</div>
  241. </td>
  242. </tr>
  243. </table>
  244. </li>
  245. </ul>
  246. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  247. <ul class="blockList">
  248. <li class="blockList"><a name="constructor.summary">
  249. <!-- -->
  250. </a>
  251. <h3>Constructor Summary</h3>
  252. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  253. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  254. <tr>
  255. <th class="colOne" scope="col">Constructor and Description</th>
  256. </tr>
  257. <tr class="altColor">
  258. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#FileUtils--">FileUtils</a></span>()</code>
  259. <div class="block">Instances should NOT be constructed in standard programming.</div>
  260. </td>
  261. </tr>
  262. </table>
  263. </li>
  264. </ul>
  265. <!-- ========== METHOD SUMMARY =========== -->
  266. <ul class="blockList">
  267. <li class="blockList"><a name="method.summary">
  268. <!-- -->
  269. </a>
  270. <h3>Method Summary</h3>
  271. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  272. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  273. <tr>
  274. <th class="colFirst" scope="col">Modifier and Type</th>
  275. <th class="colLast" scope="col">Method and Description</th>
  276. </tr>
  277. <tr id="i0" class="altColor">
  278. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  279. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#byteCountToDisplaySize-java.math.BigInteger-">byteCountToDisplaySize</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a>&nbsp;size)</code>
  280. <div class="block">Returns a human-readable version of the file size, where the input represents a specific number of bytes.</div>
  281. </td>
  282. </tr>
  283. <tr id="i1" class="rowColor">
  284. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  285. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#byteCountToDisplaySize-long-">byteCountToDisplaySize</a></span>(long&nbsp;size)</code>
  286. <div class="block">Returns a human-readable version of the file size, where the input represents a specific number of bytes.</div>
  287. </td>
  288. </tr>
  289. <tr id="i2" class="altColor">
  290. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></code></td>
  291. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#checksum-java.io.File-java.util.zip.Checksum-">checksum</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  292. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a>&nbsp;checksum)</code>
  293. <div class="block">Computes the checksum of a file using the specified checksum object.</div>
  294. </td>
  295. </tr>
  296. <tr id="i3" class="rowColor">
  297. <td class="colFirst"><code>static long</code></td>
  298. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#checksumCRC32-java.io.File-">checksumCRC32</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  299. <div class="block">Computes the checksum of a file using the CRC32 checksum routine.</div>
  300. </td>
  301. </tr>
  302. <tr id="i4" class="altColor">
  303. <td class="colFirst"><code>static void</code></td>
  304. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#cleanDirectory-java.io.File-">cleanDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory)</code>
  305. <div class="block">Cleans a directory without deleting it.</div>
  306. </td>
  307. </tr>
  308. <tr id="i5" class="rowColor">
  309. <td class="colFirst"><code>static boolean</code></td>
  310. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#contentEquals-java.io.File-java.io.File-">contentEquals</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file1,
  311. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file2)</code>
  312. <div class="block">Compares the contents of two files to determine if they are equal or not.</div>
  313. </td>
  314. </tr>
  315. <tr id="i6" class="altColor">
  316. <td class="colFirst"><code>static boolean</code></td>
  317. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#contentEqualsIgnoreEOL-java.io.File-java.io.File-java.lang.String-">contentEqualsIgnoreEOL</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file1,
  318. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file2,
  319. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
  320. <div class="block">Compares the contents of two files to determine if they are equal or not.</div>
  321. </td>
  322. </tr>
  323. <tr id="i7" class="rowColor">
  324. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>[]</code></td>
  325. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#convertFileCollectionToFileArray-java.util.Collection-">convertFileCollectionToFileArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;&nbsp;files)</code>
  326. <div class="block">Converts a Collection containing java.io.File instanced into array
  327. representation.</div>
  328. </td>
  329. </tr>
  330. <tr id="i8" class="altColor">
  331. <td class="colFirst"><code>static void</code></td>
  332. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyDirectory-java.io.File-java.io.File-">copyDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcDir,
  333. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir)</code>
  334. <div class="block">Copies a whole directory to a new location preserving the file dates.</div>
  335. </td>
  336. </tr>
  337. <tr id="i9" class="rowColor">
  338. <td class="colFirst"><code>static void</code></td>
  339. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyDirectory-java.io.File-java.io.File-boolean-">copyDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcDir,
  340. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir,
  341. boolean&nbsp;preserveFileDate)</code>
  342. <div class="block">Copies a whole directory to a new location.</div>
  343. </td>
  344. </tr>
  345. <tr id="i10" class="altColor">
  346. <td class="colFirst"><code>static void</code></td>
  347. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyDirectory-java.io.File-java.io.File-java.io.FileFilter-">copyDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcDir,
  348. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir,
  349. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileFilter.html?is-external=true" title="class or interface in java.io">FileFilter</a>&nbsp;filter)</code>
  350. <div class="block">Copies a filtered directory to a new location preserving the file dates.</div>
  351. </td>
  352. </tr>
  353. <tr id="i11" class="rowColor">
  354. <td class="colFirst"><code>static void</code></td>
  355. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyDirectory-java.io.File-java.io.File-java.io.FileFilter-boolean-">copyDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcDir,
  356. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir,
  357. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileFilter.html?is-external=true" title="class or interface in java.io">FileFilter</a>&nbsp;filter,
  358. boolean&nbsp;preserveFileDate)</code>
  359. <div class="block">Copies a filtered directory to a new location.</div>
  360. </td>
  361. </tr>
  362. <tr id="i12" class="altColor">
  363. <td class="colFirst"><code>static void</code></td>
  364. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyDirectoryToDirectory-java.io.File-java.io.File-">copyDirectoryToDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcDir,
  365. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir)</code>
  366. <div class="block">Copies a directory to within another directory preserving the file dates.</div>
  367. </td>
  368. </tr>
  369. <tr id="i13" class="rowColor">
  370. <td class="colFirst"><code>static void</code></td>
  371. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyFile-java.io.File-java.io.File-">copyFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcFile,
  372. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destFile)</code>
  373. <div class="block">Copies a file to a new location preserving the file date.</div>
  374. </td>
  375. </tr>
  376. <tr id="i14" class="altColor">
  377. <td class="colFirst"><code>static void</code></td>
  378. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyFile-java.io.File-java.io.File-boolean-">copyFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcFile,
  379. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destFile,
  380. boolean&nbsp;preserveFileDate)</code>
  381. <div class="block">Copies a file to a new location.</div>
  382. </td>
  383. </tr>
  384. <tr id="i15" class="rowColor">
  385. <td class="colFirst"><code>static long</code></td>
  386. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyFile-java.io.File-java.io.OutputStream-">copyFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;input,
  387. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)</code>
  388. <div class="block">Copy bytes from a <code>File</code> to an <code>OutputStream</code>.</div>
  389. </td>
  390. </tr>
  391. <tr id="i16" class="altColor">
  392. <td class="colFirst"><code>static void</code></td>
  393. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyFileToDirectory-java.io.File-java.io.File-">copyFileToDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcFile,
  394. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir)</code>
  395. <div class="block">Copies a file to a directory preserving the file date.</div>
  396. </td>
  397. </tr>
  398. <tr id="i17" class="rowColor">
  399. <td class="colFirst"><code>static void</code></td>
  400. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyFileToDirectory-java.io.File-java.io.File-boolean-">copyFileToDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcFile,
  401. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir,
  402. boolean&nbsp;preserveFileDate)</code>
  403. <div class="block">Copies a file to a directory optionally preserving the file date.</div>
  404. </td>
  405. </tr>
  406. <tr id="i18" class="altColor">
  407. <td class="colFirst"><code>static void</code></td>
  408. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyInputStreamToFile-java.io.InputStream-java.io.File-">copyInputStreamToFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;source,
  409. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destination)</code>
  410. <div class="block">Copies bytes from an <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a> <code>source</code> to a file
  411. <code>destination</code>.</div>
  412. </td>
  413. </tr>
  414. <tr id="i19" class="rowColor">
  415. <td class="colFirst"><code>static void</code></td>
  416. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyToDirectory-java.io.File-java.io.File-">copyToDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;src,
  417. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir)</code>
  418. <div class="block">Copies a file or directory to within another directory preserving the file dates.</div>
  419. </td>
  420. </tr>
  421. <tr id="i20" class="altColor">
  422. <td class="colFirst"><code>static void</code></td>
  423. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyToDirectory-java.lang.Iterable-java.io.File-">copyToDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;&nbsp;srcs,
  424. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir)</code>
  425. <div class="block">Copies a files to a directory preserving each file's date.</div>
  426. </td>
  427. </tr>
  428. <tr id="i21" class="rowColor">
  429. <td class="colFirst"><code>static void</code></td>
  430. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyToFile-java.io.InputStream-java.io.File-">copyToFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;source,
  431. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destination)</code>
  432. <div class="block">Copies bytes from an <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a> <code>source</code> to a file
  433. <code>destination</code>.</div>
  434. </td>
  435. </tr>
  436. <tr id="i22" class="altColor">
  437. <td class="colFirst"><code>static void</code></td>
  438. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyURLToFile-java.net.URL-java.io.File-">copyURLToFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;source,
  439. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destination)</code>
  440. <div class="block">Copies bytes from the URL <code>source</code> to a file
  441. <code>destination</code>.</div>
  442. </td>
  443. </tr>
  444. <tr id="i23" class="rowColor">
  445. <td class="colFirst"><code>static void</code></td>
  446. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#copyURLToFile-java.net.URL-java.io.File-int-int-">copyURLToFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;source,
  447. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destination,
  448. int&nbsp;connectionTimeout,
  449. int&nbsp;readTimeout)</code>
  450. <div class="block">Copies bytes from the URL <code>source</code> to a file
  451. <code>destination</code>.</div>
  452. </td>
  453. </tr>
  454. <tr id="i24" class="altColor">
  455. <td class="colFirst"><code>static void</code></td>
  456. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#deleteDirectory-java.io.File-">deleteDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory)</code>
  457. <div class="block">Deletes a directory recursively.</div>
  458. </td>
  459. </tr>
  460. <tr id="i25" class="rowColor">
  461. <td class="colFirst"><code>static boolean</code></td>
  462. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#deleteQuietly-java.io.File-">deleteQuietly</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  463. <div class="block">Deletes a file, never throwing an exception.</div>
  464. </td>
  465. </tr>
  466. <tr id="i26" class="altColor">
  467. <td class="colFirst"><code>static boolean</code></td>
  468. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#directoryContains-java.io.File-java.io.File-">directoryContains</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  469. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;child)</code>
  470. <div class="block">Determines whether the <code>parent</code> directory contains the <code>child</code> element (a file or directory).</div>
  471. </td>
  472. </tr>
  473. <tr id="i27" class="rowColor">
  474. <td class="colFirst"><code>static void</code></td>
  475. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#forceDelete-java.io.File-">forceDelete</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  476. <div class="block">Deletes a file.</div>
  477. </td>
  478. </tr>
  479. <tr id="i28" class="altColor">
  480. <td class="colFirst"><code>static void</code></td>
  481. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#forceDeleteOnExit-java.io.File-">forceDeleteOnExit</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  482. <div class="block">Schedules a file to be deleted when JVM exits.</div>
  483. </td>
  484. </tr>
  485. <tr id="i29" class="rowColor">
  486. <td class="colFirst"><code>static void</code></td>
  487. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#forceMkdir-java.io.File-">forceMkdir</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory)</code>
  488. <div class="block">Makes a directory, including any necessary but nonexistent parent
  489. directories.</div>
  490. </td>
  491. </tr>
  492. <tr id="i30" class="altColor">
  493. <td class="colFirst"><code>static void</code></td>
  494. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#forceMkdirParent-java.io.File-">forceMkdirParent</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  495. <div class="block">Makes any necessary but nonexistent parent directories for a given File.</div>
  496. </td>
  497. </tr>
  498. <tr id="i31" class="rowColor">
  499. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td>
  500. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#getFile-java.io.File-java.lang.String...-">getFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  501. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;names)</code>
  502. <div class="block">Construct a file from the set of name elements.</div>
  503. </td>
  504. </tr>
  505. <tr id="i32" class="altColor">
  506. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td>
  507. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#getFile-java.lang.String...-">getFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;names)</code>
  508. <div class="block">Construct a file from the set of name elements.</div>
  509. </td>
  510. </tr>
  511. <tr id="i33" class="rowColor">
  512. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td>
  513. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#getTempDirectory--">getTempDirectory</a></span>()</code>
  514. <div class="block">Returns a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io"><code>File</code></a> representing the system temporary directory.</div>
  515. </td>
  516. </tr>
  517. <tr id="i34" class="altColor">
  518. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  519. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#getTempDirectoryPath--">getTempDirectoryPath</a></span>()</code>
  520. <div class="block">Returns the path to the system temporary directory.</div>
  521. </td>
  522. </tr>
  523. <tr id="i35" class="rowColor">
  524. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td>
  525. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#getUserDirectory--">getUserDirectory</a></span>()</code>
  526. <div class="block">Returns a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io"><code>File</code></a> representing the user's home directory.</div>
  527. </td>
  528. </tr>
  529. <tr id="i36" class="altColor">
  530. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  531. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#getUserDirectoryPath--">getUserDirectoryPath</a></span>()</code>
  532. <div class="block">Returns the path to the user's home directory.</div>
  533. </td>
  534. </tr>
  535. <tr id="i37" class="rowColor">
  536. <td class="colFirst"><code>static boolean</code></td>
  537. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#isFileNewer-java.io.File-java.util.Date-">isFileNewer</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  538. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date)</code>
  539. <div class="block">Tests if the specified <code>File</code> is newer than the specified
  540. <code>Date</code>.</div>
  541. </td>
  542. </tr>
  543. <tr id="i38" class="altColor">
  544. <td class="colFirst"><code>static boolean</code></td>
  545. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#isFileNewer-java.io.File-java.io.File-">isFileNewer</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  546. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;reference)</code>
  547. <div class="block">Tests if the specified <code>File</code> is newer than the reference
  548. <code>File</code>.</div>
  549. </td>
  550. </tr>
  551. <tr id="i39" class="rowColor">
  552. <td class="colFirst"><code>static boolean</code></td>
  553. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#isFileNewer-java.io.File-long-">isFileNewer</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  554. long&nbsp;timeMillis)</code>
  555. <div class="block">Tests if the specified <code>File</code> is newer than the specified
  556. time reference.</div>
  557. </td>
  558. </tr>
  559. <tr id="i40" class="altColor">
  560. <td class="colFirst"><code>static boolean</code></td>
  561. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#isFileOlder-java.io.File-java.util.Date-">isFileOlder</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  562. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date)</code>
  563. <div class="block">Tests if the specified <code>File</code> is older than the specified
  564. <code>Date</code>.</div>
  565. </td>
  566. </tr>
  567. <tr id="i41" class="rowColor">
  568. <td class="colFirst"><code>static boolean</code></td>
  569. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#isFileOlder-java.io.File-java.io.File-">isFileOlder</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  570. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;reference)</code>
  571. <div class="block">Tests if the specified <code>File</code> is older than the reference
  572. <code>File</code>.</div>
  573. </td>
  574. </tr>
  575. <tr id="i42" class="altColor">
  576. <td class="colFirst"><code>static boolean</code></td>
  577. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#isFileOlder-java.io.File-long-">isFileOlder</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  578. long&nbsp;timeMillis)</code>
  579. <div class="block">Tests if the specified <code>File</code> is older than the specified
  580. time reference.</div>
  581. </td>
  582. </tr>
  583. <tr id="i43" class="rowColor">
  584. <td class="colFirst"><code>static boolean</code></td>
  585. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#isSymlink-java.io.File-">isSymlink</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  586. <div class="block">Determines whether the specified file is a Symbolic Link rather than an actual file.</div>
  587. </td>
  588. </tr>
  589. <tr id="i44" class="altColor">
  590. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;</code></td>
  591. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#iterateFiles-java.io.File-org.apache.commons.io.filefilter.IOFileFilter-org.apache.commons.io.filefilter.IOFileFilter-">iterateFiles</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  592. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;fileFilter,
  593. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;dirFilter)</code>
  594. <div class="block">Allows iteration over the files in given directory (and optionally
  595. its subdirectories).</div>
  596. </td>
  597. </tr>
  598. <tr id="i45" class="rowColor">
  599. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;</code></td>
  600. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#iterateFiles-java.io.File-java.lang.String:A-boolean-">iterateFiles</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  601. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;extensions,
  602. boolean&nbsp;recursive)</code>
  603. <div class="block">Allows iteration over the files in a given directory (and optionally
  604. its subdirectories) which match an array of extensions.</div>
  605. </td>
  606. </tr>
  607. <tr id="i46" class="altColor">
  608. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;</code></td>
  609. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#iterateFilesAndDirs-java.io.File-org.apache.commons.io.filefilter.IOFileFilter-org.apache.commons.io.filefilter.IOFileFilter-">iterateFilesAndDirs</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  610. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;fileFilter,
  611. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;dirFilter)</code>
  612. <div class="block">Allows iteration over the files in given directory (and optionally
  613. its subdirectories).</div>
  614. </td>
  615. </tr>
  616. <tr id="i47" class="rowColor">
  617. <td class="colFirst"><code>static <a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a></code></td>
  618. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#lineIterator-java.io.File-">lineIterator</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  619. <div class="block">Returns an Iterator for the lines in a <code>File</code> using the default encoding for the VM.</div>
  620. </td>
  621. </tr>
  622. <tr id="i48" class="altColor">
  623. <td class="colFirst"><code>static <a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a></code></td>
  624. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#lineIterator-java.io.File-java.lang.String-">lineIterator</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  625. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  626. <div class="block">Returns an Iterator for the lines in a <code>File</code>.</div>
  627. </td>
  628. </tr>
  629. <tr id="i49" class="rowColor">
  630. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;</code></td>
  631. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#listFiles-java.io.File-org.apache.commons.io.filefilter.IOFileFilter-org.apache.commons.io.filefilter.IOFileFilter-">listFiles</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  632. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;fileFilter,
  633. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;dirFilter)</code>
  634. <div class="block">Finds files within a given directory (and optionally its
  635. subdirectories).</div>
  636. </td>
  637. </tr>
  638. <tr id="i50" class="altColor">
  639. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;</code></td>
  640. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#listFiles-java.io.File-java.lang.String:A-boolean-">listFiles</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  641. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;extensions,
  642. boolean&nbsp;recursive)</code>
  643. <div class="block">Finds files within a given directory (and optionally its subdirectories)
  644. which match an array of extensions.</div>
  645. </td>
  646. </tr>
  647. <tr id="i51" class="rowColor">
  648. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;</code></td>
  649. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#listFilesAndDirs-java.io.File-org.apache.commons.io.filefilter.IOFileFilter-org.apache.commons.io.filefilter.IOFileFilter-">listFilesAndDirs</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  650. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;fileFilter,
  651. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;dirFilter)</code>
  652. <div class="block">Finds files within a given directory (and optionally its
  653. subdirectories).</div>
  654. </td>
  655. </tr>
  656. <tr id="i52" class="altColor">
  657. <td class="colFirst"><code>static void</code></td>
  658. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#moveDirectory-java.io.File-java.io.File-">moveDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcDir,
  659. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir)</code>
  660. <div class="block">Moves a directory.</div>
  661. </td>
  662. </tr>
  663. <tr id="i53" class="rowColor">
  664. <td class="colFirst"><code>static void</code></td>
  665. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#moveDirectoryToDirectory-java.io.File-java.io.File-boolean-">moveDirectoryToDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;src,
  666. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir,
  667. boolean&nbsp;createDestDir)</code>
  668. <div class="block">Moves a directory to another directory.</div>
  669. </td>
  670. </tr>
  671. <tr id="i54" class="altColor">
  672. <td class="colFirst"><code>static void</code></td>
  673. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#moveFile-java.io.File-java.io.File-">moveFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcFile,
  674. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destFile)</code>
  675. <div class="block">Moves a file.</div>
  676. </td>
  677. </tr>
  678. <tr id="i55" class="rowColor">
  679. <td class="colFirst"><code>static void</code></td>
  680. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#moveFileToDirectory-java.io.File-java.io.File-boolean-">moveFileToDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcFile,
  681. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir,
  682. boolean&nbsp;createDestDir)</code>
  683. <div class="block">Moves a file to a directory.</div>
  684. </td>
  685. </tr>
  686. <tr id="i56" class="altColor">
  687. <td class="colFirst"><code>static void</code></td>
  688. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#moveToDirectory-java.io.File-java.io.File-boolean-">moveToDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;src,
  689. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir,
  690. boolean&nbsp;createDestDir)</code>
  691. <div class="block">Moves a file or directory to the destination directory.</div>
  692. </td>
  693. </tr>
  694. <tr id="i57" class="rowColor">
  695. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileInputStream.html?is-external=true" title="class or interface in java.io">FileInputStream</a></code></td>
  696. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#openInputStream-java.io.File-">openInputStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  697. <div class="block">Opens a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileInputStream.html?is-external=true" title="class or interface in java.io"><code>FileInputStream</code></a> for the specified file, providing better
  698. error messages than simply calling <code>new FileInputStream(file)</code>.</div>
  699. </td>
  700. </tr>
  701. <tr id="i58" class="altColor">
  702. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileOutputStream.html?is-external=true" title="class or interface in java.io">FileOutputStream</a></code></td>
  703. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#openOutputStream-java.io.File-">openOutputStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  704. <div class="block">Opens a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileOutputStream.html?is-external=true" title="class or interface in java.io"><code>FileOutputStream</code></a> for the specified file, checking and
  705. creating the parent directory if it does not exist.</div>
  706. </td>
  707. </tr>
  708. <tr id="i59" class="rowColor">
  709. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileOutputStream.html?is-external=true" title="class or interface in java.io">FileOutputStream</a></code></td>
  710. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#openOutputStream-java.io.File-boolean-">openOutputStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  711. boolean&nbsp;append)</code>
  712. <div class="block">Opens a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileOutputStream.html?is-external=true" title="class or interface in java.io"><code>FileOutputStream</code></a> for the specified file, checking and
  713. creating the parent directory if it does not exist.</div>
  714. </td>
  715. </tr>
  716. <tr id="i60" class="altColor">
  717. <td class="colFirst"><code>static byte[]</code></td>
  718. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#readFileToByteArray-java.io.File-">readFileToByteArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  719. <div class="block">Reads the contents of a file into a byte array.</div>
  720. </td>
  721. </tr>
  722. <tr id="i61" class="rowColor">
  723. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  724. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#readFileToString-java.io.File-">readFileToString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  725. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  726. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/FileUtils.html#readFileToString-java.io.File-java.nio.charset.Charset-"><code>readFileToString(File, Charset)</code></a> instead (and specify the appropriate encoding)</span></div>
  727. </div>
  728. </td>
  729. </tr>
  730. <tr id="i62" class="altColor">
  731. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  732. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#readFileToString-java.io.File-java.nio.charset.Charset-">readFileToString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  733. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  734. <div class="block">Reads the contents of a file into a String.</div>
  735. </td>
  736. </tr>
  737. <tr id="i63" class="rowColor">
  738. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  739. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#readFileToString-java.io.File-java.lang.String-">readFileToString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  740. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  741. <div class="block">Reads the contents of a file into a String.</div>
  742. </td>
  743. </tr>
  744. <tr id="i64" class="altColor">
  745. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
  746. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#readLines-java.io.File-">readLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  747. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  748. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/FileUtils.html#readLines-java.io.File-java.nio.charset.Charset-"><code>readLines(File, Charset)</code></a> instead (and specify the appropriate encoding)</span></div>
  749. </div>
  750. </td>
  751. </tr>
  752. <tr id="i65" class="rowColor">
  753. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
  754. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#readLines-java.io.File-java.nio.charset.Charset-">readLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  755. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  756. <div class="block">Reads the contents of a file line by line to a List of Strings.</div>
  757. </td>
  758. </tr>
  759. <tr id="i66" class="altColor">
  760. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
  761. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#readLines-java.io.File-java.lang.String-">readLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  762. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  763. <div class="block">Reads the contents of a file line by line to a List of Strings.</div>
  764. </td>
  765. </tr>
  766. <tr id="i67" class="rowColor">
  767. <td class="colFirst"><code>static long</code></td>
  768. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#sizeOf-java.io.File-">sizeOf</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  769. <div class="block">Returns the size of the specified file or directory.</div>
  770. </td>
  771. </tr>
  772. <tr id="i68" class="altColor">
  773. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a></code></td>
  774. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#sizeOfAsBigInteger-java.io.File-">sizeOfAsBigInteger</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  775. <div class="block">Returns the size of the specified file or directory.</div>
  776. </td>
  777. </tr>
  778. <tr id="i69" class="rowColor">
  779. <td class="colFirst"><code>static long</code></td>
  780. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#sizeOfDirectory-java.io.File-">sizeOfDirectory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory)</code>
  781. <div class="block">Counts the size of a directory recursively (sum of the length of all files).</div>
  782. </td>
  783. </tr>
  784. <tr id="i70" class="altColor">
  785. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a></code></td>
  786. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#sizeOfDirectoryAsBigInteger-java.io.File-">sizeOfDirectoryAsBigInteger</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory)</code>
  787. <div class="block">Counts the size of a directory recursively (sum of the length of all files).</div>
  788. </td>
  789. </tr>
  790. <tr id="i71" class="rowColor">
  791. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td>
  792. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#toFile-java.net.URL-">toFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url)</code>
  793. <div class="block">Convert from a <code>URL</code> to a <code>File</code>.</div>
  794. </td>
  795. </tr>
  796. <tr id="i72" class="altColor">
  797. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>[]</code></td>
  798. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#toFiles-java.net.URL:A-">toFiles</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>[]&nbsp;urls)</code>
  799. <div class="block">Converts each of an array of <code>URL</code> to a <code>File</code>.</div>
  800. </td>
  801. </tr>
  802. <tr id="i73" class="rowColor">
  803. <td class="colFirst"><code>static void</code></td>
  804. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#touch-java.io.File-">touch</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
  805. <div class="block">Implements the same behaviour as the "touch" utility on Unix.</div>
  806. </td>
  807. </tr>
  808. <tr id="i74" class="altColor">
  809. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>[]</code></td>
  810. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#toURLs-java.io.File:A-">toURLs</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>[]&nbsp;files)</code>
  811. <div class="block">Converts each of an array of <code>File</code> to a <code>URL</code>.</div>
  812. </td>
  813. </tr>
  814. <tr id="i75" class="rowColor">
  815. <td class="colFirst"><code>static boolean</code></td>
  816. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#waitFor-java.io.File-int-">waitFor</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  817. int&nbsp;seconds)</code>
  818. <div class="block">Waits for NFS to propagate a file creation, imposing a timeout.</div>
  819. </td>
  820. </tr>
  821. <tr id="i76" class="altColor">
  822. <td class="colFirst"><code>static void</code></td>
  823. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#write-java.io.File-java.lang.CharSequence-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  824. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data)</code>
  825. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  826. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/FileUtils.html#write-java.io.File-java.lang.CharSequence-java.nio.charset.Charset-"><code>write(File, CharSequence, Charset)</code></a> instead (and specify the appropriate encoding)</span></div>
  827. </div>
  828. </td>
  829. </tr>
  830. <tr id="i77" class="rowColor">
  831. <td class="colFirst"><code>static void</code></td>
  832. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#write-java.io.File-java.lang.CharSequence-boolean-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  833. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  834. boolean&nbsp;append)</code>
  835. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  836. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/FileUtils.html#write-java.io.File-java.lang.CharSequence-java.nio.charset.Charset-boolean-"><code>write(File, CharSequence, Charset, boolean)</code></a> instead (and specify the appropriate encoding)</span></div>
  837. </div>
  838. </td>
  839. </tr>
  840. <tr id="i78" class="altColor">
  841. <td class="colFirst"><code>static void</code></td>
  842. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#write-java.io.File-java.lang.CharSequence-java.nio.charset.Charset-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  843. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  844. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  845. <div class="block">Writes a CharSequence to a file creating the file if it does not exist.</div>
  846. </td>
  847. </tr>
  848. <tr id="i79" class="rowColor">
  849. <td class="colFirst"><code>static void</code></td>
  850. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#write-java.io.File-java.lang.CharSequence-java.nio.charset.Charset-boolean-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  851. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  852. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding,
  853. boolean&nbsp;append)</code>
  854. <div class="block">Writes a CharSequence to a file creating the file if it does not exist.</div>
  855. </td>
  856. </tr>
  857. <tr id="i80" class="altColor">
  858. <td class="colFirst"><code>static void</code></td>
  859. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#write-java.io.File-java.lang.CharSequence-java.lang.String-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  860. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  861. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  862. <div class="block">Writes a CharSequence to a file creating the file if it does not exist.</div>
  863. </td>
  864. </tr>
  865. <tr id="i81" class="rowColor">
  866. <td class="colFirst"><code>static void</code></td>
  867. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#write-java.io.File-java.lang.CharSequence-java.lang.String-boolean-">write</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  868. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  869. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding,
  870. boolean&nbsp;append)</code>
  871. <div class="block">Writes a CharSequence to a file creating the file if it does not exist.</div>
  872. </td>
  873. </tr>
  874. <tr id="i82" class="altColor">
  875. <td class="colFirst"><code>static void</code></td>
  876. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeByteArrayToFile-java.io.File-byte:A-">writeByteArrayToFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  877. byte[]&nbsp;data)</code>
  878. <div class="block">Writes a byte array to a file creating the file if it does not exist.</div>
  879. </td>
  880. </tr>
  881. <tr id="i83" class="rowColor">
  882. <td class="colFirst"><code>static void</code></td>
  883. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeByteArrayToFile-java.io.File-byte:A-boolean-">writeByteArrayToFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  884. byte[]&nbsp;data,
  885. boolean&nbsp;append)</code>
  886. <div class="block">Writes a byte array to a file creating the file if it does not exist.</div>
  887. </td>
  888. </tr>
  889. <tr id="i84" class="altColor">
  890. <td class="colFirst"><code>static void</code></td>
  891. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeByteArrayToFile-java.io.File-byte:A-int-int-">writeByteArrayToFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  892. byte[]&nbsp;data,
  893. int&nbsp;off,
  894. int&nbsp;len)</code>
  895. <div class="block">Writes <code>len</code> bytes from the specified byte array starting
  896. at offset <code>off</code> to a file, creating the file if it does
  897. not exist.</div>
  898. </td>
  899. </tr>
  900. <tr id="i85" class="rowColor">
  901. <td class="colFirst"><code>static void</code></td>
  902. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeByteArrayToFile-java.io.File-byte:A-int-int-boolean-">writeByteArrayToFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  903. byte[]&nbsp;data,
  904. int&nbsp;off,
  905. int&nbsp;len,
  906. boolean&nbsp;append)</code>
  907. <div class="block">Writes <code>len</code> bytes from the specified byte array starting
  908. at offset <code>off</code> to a file, creating the file if it does
  909. not exist.</div>
  910. </td>
  911. </tr>
  912. <tr id="i86" class="altColor">
  913. <td class="colFirst"><code>static void</code></td>
  914. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeLines-java.io.File-java.util.Collection-">writeLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  915. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines)</code>
  916. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  917. the specified <code>File</code> line by line.</div>
  918. </td>
  919. </tr>
  920. <tr id="i87" class="rowColor">
  921. <td class="colFirst"><code>static void</code></td>
  922. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeLines-java.io.File-java.util.Collection-boolean-">writeLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  923. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  924. boolean&nbsp;append)</code>
  925. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  926. the specified <code>File</code> line by line.</div>
  927. </td>
  928. </tr>
  929. <tr id="i88" class="altColor">
  930. <td class="colFirst"><code>static void</code></td>
  931. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeLines-java.io.File-java.util.Collection-java.lang.String-">writeLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  932. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  933. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding)</code>
  934. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  935. the specified <code>File</code> line by line.</div>
  936. </td>
  937. </tr>
  938. <tr id="i89" class="rowColor">
  939. <td class="colFirst"><code>static void</code></td>
  940. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeLines-java.io.File-java.util.Collection-java.lang.String-boolean-">writeLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  941. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  942. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
  943. boolean&nbsp;append)</code>
  944. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  945. the specified <code>File</code> line by line.</div>
  946. </td>
  947. </tr>
  948. <tr id="i90" class="altColor">
  949. <td class="colFirst"><code>static void</code></td>
  950. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeLines-java.io.File-java.lang.String-java.util.Collection-">writeLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  951. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding,
  952. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines)</code>
  953. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  954. the specified <code>File</code> line by line.</div>
  955. </td>
  956. </tr>
  957. <tr id="i91" class="rowColor">
  958. <td class="colFirst"><code>static void</code></td>
  959. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeLines-java.io.File-java.lang.String-java.util.Collection-boolean-">writeLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  960. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding,
  961. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  962. boolean&nbsp;append)</code>
  963. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  964. the specified <code>File</code> line by line, optionally appending.</div>
  965. </td>
  966. </tr>
  967. <tr id="i92" class="altColor">
  968. <td class="colFirst"><code>static void</code></td>
  969. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeLines-java.io.File-java.lang.String-java.util.Collection-java.lang.String-">writeLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  970. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding,
  971. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  972. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding)</code>
  973. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  974. the specified <code>File</code> line by line.</div>
  975. </td>
  976. </tr>
  977. <tr id="i93" class="rowColor">
  978. <td class="colFirst"><code>static void</code></td>
  979. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeLines-java.io.File-java.lang.String-java.util.Collection-java.lang.String-boolean-">writeLines</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  980. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding,
  981. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  982. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
  983. boolean&nbsp;append)</code>
  984. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  985. the specified <code>File</code> line by line.</div>
  986. </td>
  987. </tr>
  988. <tr id="i94" class="altColor">
  989. <td class="colFirst"><code>static void</code></td>
  990. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeStringToFile-java.io.File-java.lang.String-">writeStringToFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  991. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data)</code>
  992. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  993. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/FileUtils.html#writeStringToFile-java.io.File-java.lang.String-java.nio.charset.Charset-"><code>writeStringToFile(File, String, Charset)</code></a> instead (and specify the appropriate encoding)</span></div>
  994. </div>
  995. </td>
  996. </tr>
  997. <tr id="i95" class="rowColor">
  998. <td class="colFirst"><code>static void</code></td>
  999. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeStringToFile-java.io.File-java.lang.String-boolean-">writeStringToFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  1000. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  1001. boolean&nbsp;append)</code>
  1002. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  1003. <div class="block"><span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/FileUtils.html#writeStringToFile-java.io.File-java.lang.String-java.nio.charset.Charset-boolean-"><code>writeStringToFile(File, String, Charset, boolean)</code></a> instead (and specify the appropriate encoding)</span></div>
  1004. </div>
  1005. </td>
  1006. </tr>
  1007. <tr id="i96" class="altColor">
  1008. <td class="colFirst"><code>static void</code></td>
  1009. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeStringToFile-java.io.File-java.lang.String-java.nio.charset.Charset-">writeStringToFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  1010. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  1011. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)</code>
  1012. <div class="block">Writes a String to a file creating the file if it does not exist.</div>
  1013. </td>
  1014. </tr>
  1015. <tr id="i97" class="rowColor">
  1016. <td class="colFirst"><code>static void</code></td>
  1017. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeStringToFile-java.io.File-java.lang.String-java.nio.charset.Charset-boolean-">writeStringToFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  1018. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  1019. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding,
  1020. boolean&nbsp;append)</code>
  1021. <div class="block">Writes a String to a file creating the file if it does not exist.</div>
  1022. </td>
  1023. </tr>
  1024. <tr id="i98" class="altColor">
  1025. <td class="colFirst"><code>static void</code></td>
  1026. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeStringToFile-java.io.File-java.lang.String-java.lang.String-">writeStringToFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  1027. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  1028. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)</code>
  1029. <div class="block">Writes a String to a file creating the file if it does not exist.</div>
  1030. </td>
  1031. </tr>
  1032. <tr id="i99" class="rowColor">
  1033. <td class="colFirst"><code>static void</code></td>
  1034. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/io/FileUtils.html#writeStringToFile-java.io.File-java.lang.String-java.lang.String-boolean-">writeStringToFile</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  1035. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  1036. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding,
  1037. boolean&nbsp;append)</code>
  1038. <div class="block">Writes a String to a file creating the file if it does not exist.</div>
  1039. </td>
  1040. </tr>
  1041. </table>
  1042. <ul class="blockList">
  1043. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  1044. <!-- -->
  1045. </a>
  1046. <h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
  1047. <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/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://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
  1048. </ul>
  1049. </li>
  1050. </ul>
  1051. </li>
  1052. </ul>
  1053. </div>
  1054. <div class="details">
  1055. <ul class="blockList">
  1056. <li class="blockList">
  1057. <!-- ============ FIELD DETAIL =========== -->
  1058. <ul class="blockList">
  1059. <li class="blockList"><a name="field.detail">
  1060. <!-- -->
  1061. </a>
  1062. <h3>Field Detail</h3>
  1063. <a name="ONE_KB">
  1064. <!-- -->
  1065. </a>
  1066. <ul class="blockList">
  1067. <li class="blockList">
  1068. <h4>ONE_KB</h4>
  1069. <pre>public static final&nbsp;long ONE_KB</pre>
  1070. <div class="block">The number of bytes in a kilobyte.</div>
  1071. <dl>
  1072. <dt><span class="seeLabel">See Also:</span></dt>
  1073. <dd><a href="../../../../constant-values.html#org.apache.commons.io.FileUtils.ONE_KB">Constant Field Values</a></dd>
  1074. </dl>
  1075. </li>
  1076. </ul>
  1077. <a name="ONE_KB_BI">
  1078. <!-- -->
  1079. </a>
  1080. <ul class="blockList">
  1081. <li class="blockList">
  1082. <h4>ONE_KB_BI</h4>
  1083. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> ONE_KB_BI</pre>
  1084. <div class="block">The number of bytes in a kilobyte.</div>
  1085. <dl>
  1086. <dt><span class="simpleTagLabel">Since:</span></dt>
  1087. <dd>2.4</dd>
  1088. </dl>
  1089. </li>
  1090. </ul>
  1091. <a name="ONE_MB">
  1092. <!-- -->
  1093. </a>
  1094. <ul class="blockList">
  1095. <li class="blockList">
  1096. <h4>ONE_MB</h4>
  1097. <pre>public static final&nbsp;long ONE_MB</pre>
  1098. <div class="block">The number of bytes in a megabyte.</div>
  1099. <dl>
  1100. <dt><span class="seeLabel">See Also:</span></dt>
  1101. <dd><a href="../../../../constant-values.html#org.apache.commons.io.FileUtils.ONE_MB">Constant Field Values</a></dd>
  1102. </dl>
  1103. </li>
  1104. </ul>
  1105. <a name="ONE_MB_BI">
  1106. <!-- -->
  1107. </a>
  1108. <ul class="blockList">
  1109. <li class="blockList">
  1110. <h4>ONE_MB_BI</h4>
  1111. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> ONE_MB_BI</pre>
  1112. <div class="block">The number of bytes in a megabyte.</div>
  1113. <dl>
  1114. <dt><span class="simpleTagLabel">Since:</span></dt>
  1115. <dd>2.4</dd>
  1116. </dl>
  1117. </li>
  1118. </ul>
  1119. <a name="ONE_GB">
  1120. <!-- -->
  1121. </a>
  1122. <ul class="blockList">
  1123. <li class="blockList">
  1124. <h4>ONE_GB</h4>
  1125. <pre>public static final&nbsp;long ONE_GB</pre>
  1126. <div class="block">The number of bytes in a gigabyte.</div>
  1127. <dl>
  1128. <dt><span class="seeLabel">See Also:</span></dt>
  1129. <dd><a href="../../../../constant-values.html#org.apache.commons.io.FileUtils.ONE_GB">Constant Field Values</a></dd>
  1130. </dl>
  1131. </li>
  1132. </ul>
  1133. <a name="ONE_GB_BI">
  1134. <!-- -->
  1135. </a>
  1136. <ul class="blockList">
  1137. <li class="blockList">
  1138. <h4>ONE_GB_BI</h4>
  1139. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> ONE_GB_BI</pre>
  1140. <div class="block">The number of bytes in a gigabyte.</div>
  1141. <dl>
  1142. <dt><span class="simpleTagLabel">Since:</span></dt>
  1143. <dd>2.4</dd>
  1144. </dl>
  1145. </li>
  1146. </ul>
  1147. <a name="ONE_TB">
  1148. <!-- -->
  1149. </a>
  1150. <ul class="blockList">
  1151. <li class="blockList">
  1152. <h4>ONE_TB</h4>
  1153. <pre>public static final&nbsp;long ONE_TB</pre>
  1154. <div class="block">The number of bytes in a terabyte.</div>
  1155. <dl>
  1156. <dt><span class="seeLabel">See Also:</span></dt>
  1157. <dd><a href="../../../../constant-values.html#org.apache.commons.io.FileUtils.ONE_TB">Constant Field Values</a></dd>
  1158. </dl>
  1159. </li>
  1160. </ul>
  1161. <a name="ONE_TB_BI">
  1162. <!-- -->
  1163. </a>
  1164. <ul class="blockList">
  1165. <li class="blockList">
  1166. <h4>ONE_TB_BI</h4>
  1167. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> ONE_TB_BI</pre>
  1168. <div class="block">The number of bytes in a terabyte.</div>
  1169. <dl>
  1170. <dt><span class="simpleTagLabel">Since:</span></dt>
  1171. <dd>2.4</dd>
  1172. </dl>
  1173. </li>
  1174. </ul>
  1175. <a name="ONE_PB">
  1176. <!-- -->
  1177. </a>
  1178. <ul class="blockList">
  1179. <li class="blockList">
  1180. <h4>ONE_PB</h4>
  1181. <pre>public static final&nbsp;long ONE_PB</pre>
  1182. <div class="block">The number of bytes in a petabyte.</div>
  1183. <dl>
  1184. <dt><span class="seeLabel">See Also:</span></dt>
  1185. <dd><a href="../../../../constant-values.html#org.apache.commons.io.FileUtils.ONE_PB">Constant Field Values</a></dd>
  1186. </dl>
  1187. </li>
  1188. </ul>
  1189. <a name="ONE_PB_BI">
  1190. <!-- -->
  1191. </a>
  1192. <ul class="blockList">
  1193. <li class="blockList">
  1194. <h4>ONE_PB_BI</h4>
  1195. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> ONE_PB_BI</pre>
  1196. <div class="block">The number of bytes in a petabyte.</div>
  1197. <dl>
  1198. <dt><span class="simpleTagLabel">Since:</span></dt>
  1199. <dd>2.4</dd>
  1200. </dl>
  1201. </li>
  1202. </ul>
  1203. <a name="ONE_EB">
  1204. <!-- -->
  1205. </a>
  1206. <ul class="blockList">
  1207. <li class="blockList">
  1208. <h4>ONE_EB</h4>
  1209. <pre>public static final&nbsp;long ONE_EB</pre>
  1210. <div class="block">The number of bytes in an exabyte.</div>
  1211. <dl>
  1212. <dt><span class="seeLabel">See Also:</span></dt>
  1213. <dd><a href="../../../../constant-values.html#org.apache.commons.io.FileUtils.ONE_EB">Constant Field Values</a></dd>
  1214. </dl>
  1215. </li>
  1216. </ul>
  1217. <a name="ONE_EB_BI">
  1218. <!-- -->
  1219. </a>
  1220. <ul class="blockList">
  1221. <li class="blockList">
  1222. <h4>ONE_EB_BI</h4>
  1223. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> ONE_EB_BI</pre>
  1224. <div class="block">The number of bytes in an exabyte.</div>
  1225. <dl>
  1226. <dt><span class="simpleTagLabel">Since:</span></dt>
  1227. <dd>2.4</dd>
  1228. </dl>
  1229. </li>
  1230. </ul>
  1231. <a name="ONE_ZB">
  1232. <!-- -->
  1233. </a>
  1234. <ul class="blockList">
  1235. <li class="blockList">
  1236. <h4>ONE_ZB</h4>
  1237. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> ONE_ZB</pre>
  1238. <div class="block">The number of bytes in a zettabyte.</div>
  1239. </li>
  1240. </ul>
  1241. <a name="ONE_YB">
  1242. <!-- -->
  1243. </a>
  1244. <ul class="blockList">
  1245. <li class="blockList">
  1246. <h4>ONE_YB</h4>
  1247. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> ONE_YB</pre>
  1248. <div class="block">The number of bytes in a yottabyte.</div>
  1249. </li>
  1250. </ul>
  1251. <a name="EMPTY_FILE_ARRAY">
  1252. <!-- -->
  1253. </a>
  1254. <ul class="blockListLast">
  1255. <li class="blockList">
  1256. <h4>EMPTY_FILE_ARRAY</h4>
  1257. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>[] EMPTY_FILE_ARRAY</pre>
  1258. <div class="block">An empty array of type <code>File</code>.</div>
  1259. </li>
  1260. </ul>
  1261. </li>
  1262. </ul>
  1263. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  1264. <ul class="blockList">
  1265. <li class="blockList"><a name="constructor.detail">
  1266. <!-- -->
  1267. </a>
  1268. <h3>Constructor Detail</h3>
  1269. <a name="FileUtils--">
  1270. <!-- -->
  1271. </a>
  1272. <ul class="blockListLast">
  1273. <li class="blockList">
  1274. <h4>FileUtils</h4>
  1275. <pre>public&nbsp;FileUtils()</pre>
  1276. <div class="block">Instances should NOT be constructed in standard programming.</div>
  1277. </li>
  1278. </ul>
  1279. </li>
  1280. </ul>
  1281. <!-- ============ METHOD DETAIL ========== -->
  1282. <ul class="blockList">
  1283. <li class="blockList"><a name="method.detail">
  1284. <!-- -->
  1285. </a>
  1286. <h3>Method Detail</h3>
  1287. <a name="getFile-java.io.File-java.lang.String...-">
  1288. <!-- -->
  1289. </a>
  1290. <ul class="blockList">
  1291. <li class="blockList">
  1292. <h4>getFile</h4>
  1293. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;getFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  1294. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;names)</pre>
  1295. <div class="block">Construct a file from the set of name elements.</div>
  1296. <dl>
  1297. <dt><span class="paramLabel">Parameters:</span></dt>
  1298. <dd><code>directory</code> - the parent directory</dd>
  1299. <dd><code>names</code> - the name elements</dd>
  1300. <dt><span class="returnLabel">Returns:</span></dt>
  1301. <dd>the file</dd>
  1302. <dt><span class="simpleTagLabel">Since:</span></dt>
  1303. <dd>2.1</dd>
  1304. </dl>
  1305. </li>
  1306. </ul>
  1307. <a name="getFile-java.lang.String...-">
  1308. <!-- -->
  1309. </a>
  1310. <ul class="blockList">
  1311. <li class="blockList">
  1312. <h4>getFile</h4>
  1313. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;getFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;names)</pre>
  1314. <div class="block">Construct a file from the set of name elements.</div>
  1315. <dl>
  1316. <dt><span class="paramLabel">Parameters:</span></dt>
  1317. <dd><code>names</code> - the name elements</dd>
  1318. <dt><span class="returnLabel">Returns:</span></dt>
  1319. <dd>the file</dd>
  1320. <dt><span class="simpleTagLabel">Since:</span></dt>
  1321. <dd>2.1</dd>
  1322. </dl>
  1323. </li>
  1324. </ul>
  1325. <a name="getTempDirectoryPath--">
  1326. <!-- -->
  1327. </a>
  1328. <ul class="blockList">
  1329. <li class="blockList">
  1330. <h4>getTempDirectoryPath</h4>
  1331. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getTempDirectoryPath()</pre>
  1332. <div class="block">Returns the path to the system temporary directory.</div>
  1333. <dl>
  1334. <dt><span class="returnLabel">Returns:</span></dt>
  1335. <dd>the path to the system temporary directory.</dd>
  1336. <dt><span class="simpleTagLabel">Since:</span></dt>
  1337. <dd>2.0</dd>
  1338. </dl>
  1339. </li>
  1340. </ul>
  1341. <a name="getTempDirectory--">
  1342. <!-- -->
  1343. </a>
  1344. <ul class="blockList">
  1345. <li class="blockList">
  1346. <h4>getTempDirectory</h4>
  1347. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;getTempDirectory()</pre>
  1348. <div class="block">Returns a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io"><code>File</code></a> representing the system temporary directory.</div>
  1349. <dl>
  1350. <dt><span class="returnLabel">Returns:</span></dt>
  1351. <dd>the system temporary directory.</dd>
  1352. <dt><span class="simpleTagLabel">Since:</span></dt>
  1353. <dd>2.0</dd>
  1354. </dl>
  1355. </li>
  1356. </ul>
  1357. <a name="getUserDirectoryPath--">
  1358. <!-- -->
  1359. </a>
  1360. <ul class="blockList">
  1361. <li class="blockList">
  1362. <h4>getUserDirectoryPath</h4>
  1363. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getUserDirectoryPath()</pre>
  1364. <div class="block">Returns the path to the user's home directory.</div>
  1365. <dl>
  1366. <dt><span class="returnLabel">Returns:</span></dt>
  1367. <dd>the path to the user's home directory.</dd>
  1368. <dt><span class="simpleTagLabel">Since:</span></dt>
  1369. <dd>2.0</dd>
  1370. </dl>
  1371. </li>
  1372. </ul>
  1373. <a name="getUserDirectory--">
  1374. <!-- -->
  1375. </a>
  1376. <ul class="blockList">
  1377. <li class="blockList">
  1378. <h4>getUserDirectory</h4>
  1379. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;getUserDirectory()</pre>
  1380. <div class="block">Returns a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io"><code>File</code></a> representing the user's home directory.</div>
  1381. <dl>
  1382. <dt><span class="returnLabel">Returns:</span></dt>
  1383. <dd>the user's home directory.</dd>
  1384. <dt><span class="simpleTagLabel">Since:</span></dt>
  1385. <dd>2.0</dd>
  1386. </dl>
  1387. </li>
  1388. </ul>
  1389. <a name="openInputStream-java.io.File-">
  1390. <!-- -->
  1391. </a>
  1392. <ul class="blockList">
  1393. <li class="blockList">
  1394. <h4>openInputStream</h4>
  1395. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileInputStream.html?is-external=true" title="class or interface in java.io">FileInputStream</a>&nbsp;openInputStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
  1396. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  1397. <div class="block">Opens a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileInputStream.html?is-external=true" title="class or interface in java.io"><code>FileInputStream</code></a> for the specified file, providing better
  1398. error messages than simply calling <code>new FileInputStream(file)</code>.
  1399. <p>
  1400. At the end of the method either the stream will be successfully opened,
  1401. or an exception will have been thrown.
  1402. <p>
  1403. An exception is thrown if the file does not exist.
  1404. An exception is thrown if the file object exists but is a directory.
  1405. An exception is thrown if the file exists but cannot be read.</div>
  1406. <dl>
  1407. <dt><span class="paramLabel">Parameters:</span></dt>
  1408. <dd><code>file</code> - the file to open for input, must not be <code>null</code></dd>
  1409. <dt><span class="returnLabel">Returns:</span></dt>
  1410. <dd>a new <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileInputStream.html?is-external=true" title="class or interface in java.io"><code>FileInputStream</code></a> for the specified file</dd>
  1411. <dt><span class="throwsLabel">Throws:</span></dt>
  1412. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a></code> - if the file does not exist</dd>
  1413. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the file object is a directory</dd>
  1414. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the file cannot be read</dd>
  1415. <dt><span class="simpleTagLabel">Since:</span></dt>
  1416. <dd>1.3</dd>
  1417. </dl>
  1418. </li>
  1419. </ul>
  1420. <a name="openOutputStream-java.io.File-">
  1421. <!-- -->
  1422. </a>
  1423. <ul class="blockList">
  1424. <li class="blockList">
  1425. <h4>openOutputStream</h4>
  1426. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileOutputStream.html?is-external=true" title="class or interface in java.io">FileOutputStream</a>&nbsp;openOutputStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
  1427. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  1428. <div class="block">Opens a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileOutputStream.html?is-external=true" title="class or interface in java.io"><code>FileOutputStream</code></a> for the specified file, checking and
  1429. creating the parent directory if it does not exist.
  1430. <p>
  1431. At the end of the method either the stream will be successfully opened,
  1432. or an exception will have been thrown.
  1433. <p>
  1434. The parent directory will be created if it does not exist.
  1435. The file will be created if it does not exist.
  1436. An exception is thrown if the file object exists but is a directory.
  1437. An exception is thrown if the file exists but cannot be written to.
  1438. An exception is thrown if the parent directory cannot be created.</div>
  1439. <dl>
  1440. <dt><span class="paramLabel">Parameters:</span></dt>
  1441. <dd><code>file</code> - the file to open for output, must not be <code>null</code></dd>
  1442. <dt><span class="returnLabel">Returns:</span></dt>
  1443. <dd>a new <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileOutputStream.html?is-external=true" title="class or interface in java.io"><code>FileOutputStream</code></a> for the specified file</dd>
  1444. <dt><span class="throwsLabel">Throws:</span></dt>
  1445. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the file object is a directory</dd>
  1446. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the file cannot be written to</dd>
  1447. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a parent directory needs creating but that fails</dd>
  1448. <dt><span class="simpleTagLabel">Since:</span></dt>
  1449. <dd>1.3</dd>
  1450. </dl>
  1451. </li>
  1452. </ul>
  1453. <a name="openOutputStream-java.io.File-boolean-">
  1454. <!-- -->
  1455. </a>
  1456. <ul class="blockList">
  1457. <li class="blockList">
  1458. <h4>openOutputStream</h4>
  1459. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileOutputStream.html?is-external=true" title="class or interface in java.io">FileOutputStream</a>&nbsp;openOutputStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  1460. boolean&nbsp;append)
  1461. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  1462. <div class="block">Opens a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileOutputStream.html?is-external=true" title="class or interface in java.io"><code>FileOutputStream</code></a> for the specified file, checking and
  1463. creating the parent directory if it does not exist.
  1464. <p>
  1465. At the end of the method either the stream will be successfully opened,
  1466. or an exception will have been thrown.
  1467. <p>
  1468. The parent directory will be created if it does not exist.
  1469. The file will be created if it does not exist.
  1470. An exception is thrown if the file object exists but is a directory.
  1471. An exception is thrown if the file exists but cannot be written to.
  1472. An exception is thrown if the parent directory cannot be created.</div>
  1473. <dl>
  1474. <dt><span class="paramLabel">Parameters:</span></dt>
  1475. <dd><code>file</code> - the file to open for output, must not be <code>null</code></dd>
  1476. <dd><code>append</code> - if <code>true</code>, then bytes will be added to the
  1477. end of the file rather than overwriting</dd>
  1478. <dt><span class="returnLabel">Returns:</span></dt>
  1479. <dd>a new <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileOutputStream.html?is-external=true" title="class or interface in java.io"><code>FileOutputStream</code></a> for the specified file</dd>
  1480. <dt><span class="throwsLabel">Throws:</span></dt>
  1481. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the file object is a directory</dd>
  1482. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the file cannot be written to</dd>
  1483. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a parent directory needs creating but that fails</dd>
  1484. <dt><span class="simpleTagLabel">Since:</span></dt>
  1485. <dd>2.1</dd>
  1486. </dl>
  1487. </li>
  1488. </ul>
  1489. <a name="byteCountToDisplaySize-java.math.BigInteger-">
  1490. <!-- -->
  1491. </a>
  1492. <ul class="blockList">
  1493. <li class="blockList">
  1494. <h4>byteCountToDisplaySize</h4>
  1495. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;byteCountToDisplaySize(<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a>&nbsp;size)</pre>
  1496. <div class="block">Returns a human-readable version of the file size, where the input represents a specific number of bytes.
  1497. <p>
  1498. If the size is over 1GB, the size is returned as the number of whole GB, i.e. the size is rounded down to the
  1499. nearest GB boundary.
  1500. </p>
  1501. <p>
  1502. Similarly for the 1MB and 1KB boundaries.
  1503. </p></div>
  1504. <dl>
  1505. <dt><span class="paramLabel">Parameters:</span></dt>
  1506. <dd><code>size</code> - the number of bytes</dd>
  1507. <dt><span class="returnLabel">Returns:</span></dt>
  1508. <dd>a human-readable display value (includes units - EB, PB, TB, GB, MB, KB or bytes)</dd>
  1509. <dt><span class="simpleTagLabel">Since:</span></dt>
  1510. <dd>2.4</dd>
  1511. <dt><span class="seeLabel">See Also:</span></dt>
  1512. <dd><a href="https://issues.apache.org/jira/browse/IO-226">IO-226 - should the rounding be changed?</a></dd>
  1513. </dl>
  1514. </li>
  1515. </ul>
  1516. <a name="byteCountToDisplaySize-long-">
  1517. <!-- -->
  1518. </a>
  1519. <ul class="blockList">
  1520. <li class="blockList">
  1521. <h4>byteCountToDisplaySize</h4>
  1522. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;byteCountToDisplaySize(long&nbsp;size)</pre>
  1523. <div class="block">Returns a human-readable version of the file size, where the input represents a specific number of bytes.
  1524. <p>
  1525. If the size is over 1GB, the size is returned as the number of whole GB, i.e. the size is rounded down to the
  1526. nearest GB boundary.
  1527. </p>
  1528. <p>
  1529. Similarly for the 1MB and 1KB boundaries.
  1530. </p></div>
  1531. <dl>
  1532. <dt><span class="paramLabel">Parameters:</span></dt>
  1533. <dd><code>size</code> - the number of bytes</dd>
  1534. <dt><span class="returnLabel">Returns:</span></dt>
  1535. <dd>a human-readable display value (includes units - EB, PB, TB, GB, MB, KB or bytes)</dd>
  1536. <dt><span class="seeLabel">See Also:</span></dt>
  1537. <dd><a href="https://issues.apache.org/jira/browse/IO-226">IO-226 - should the rounding be changed?</a></dd>
  1538. </dl>
  1539. </li>
  1540. </ul>
  1541. <a name="touch-java.io.File-">
  1542. <!-- -->
  1543. </a>
  1544. <ul class="blockList">
  1545. <li class="blockList">
  1546. <h4>touch</h4>
  1547. <pre>public static&nbsp;void&nbsp;touch(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
  1548. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  1549. <div class="block">Implements the same behaviour as the "touch" utility on Unix. It creates
  1550. a new file with size 0 or, if the file exists already, it is opened and
  1551. closed without modifying it, but updating the file date and time.
  1552. <p>
  1553. NOTE: As from v1.3, this method throws an IOException if the last
  1554. modified date of the file cannot be set. Also, as from v1.3 this method
  1555. creates parent directories if they do not exist.</div>
  1556. <dl>
  1557. <dt><span class="paramLabel">Parameters:</span></dt>
  1558. <dd><code>file</code> - the File to touch</dd>
  1559. <dt><span class="throwsLabel">Throws:</span></dt>
  1560. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O problem occurs</dd>
  1561. </dl>
  1562. </li>
  1563. </ul>
  1564. <a name="convertFileCollectionToFileArray-java.util.Collection-">
  1565. <!-- -->
  1566. </a>
  1567. <ul class="blockList">
  1568. <li class="blockList">
  1569. <h4>convertFileCollectionToFileArray</h4>
  1570. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>[]&nbsp;convertFileCollectionToFileArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;&nbsp;files)</pre>
  1571. <div class="block">Converts a Collection containing java.io.File instanced into array
  1572. representation. This is to account for the difference between
  1573. File.listFiles() and FileUtils.listFiles().</div>
  1574. <dl>
  1575. <dt><span class="paramLabel">Parameters:</span></dt>
  1576. <dd><code>files</code> - a Collection containing java.io.File instances</dd>
  1577. <dt><span class="returnLabel">Returns:</span></dt>
  1578. <dd>an array of java.io.File</dd>
  1579. </dl>
  1580. </li>
  1581. </ul>
  1582. <a name="listFiles-java.io.File-org.apache.commons.io.filefilter.IOFileFilter-org.apache.commons.io.filefilter.IOFileFilter-">
  1583. <!-- -->
  1584. </a>
  1585. <ul class="blockList">
  1586. <li class="blockList">
  1587. <h4>listFiles</h4>
  1588. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;&nbsp;listFiles(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  1589. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;fileFilter,
  1590. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;dirFilter)</pre>
  1591. <div class="block">Finds files within a given directory (and optionally its
  1592. subdirectories). All files found are filtered by an IOFileFilter.
  1593. <p>
  1594. If your search should recurse into subdirectories you can pass in
  1595. an IOFileFilter for directories. You don't need to bind a
  1596. DirectoryFileFilter (via logical AND) to this filter. This method does
  1597. that for you.
  1598. <p>
  1599. An example: If you want to search through all directories called
  1600. "temp" you pass in <code>FileFilterUtils.NameFileFilter("temp")</code>
  1601. <p>
  1602. Another common usage of this method is find files in a directory
  1603. tree but ignoring the directories generated CVS. You can simply pass
  1604. in <code>FileFilterUtils.makeCVSAware(null)</code>.</div>
  1605. <dl>
  1606. <dt><span class="paramLabel">Parameters:</span></dt>
  1607. <dd><code>directory</code> - the directory to search in</dd>
  1608. <dd><code>fileFilter</code> - filter to apply when finding files. Must not be <code>null</code>,
  1609. use <a href="../../../../org/apache/commons/io/filefilter/TrueFileFilter.html#INSTANCE"><code>TrueFileFilter.INSTANCE</code></a> to match all files in selected directories.</dd>
  1610. <dd><code>dirFilter</code> - optional filter to apply when finding subdirectories.
  1611. If this parameter is <code>null</code>, subdirectories will not be included in the
  1612. search. Use <a href="../../../../org/apache/commons/io/filefilter/TrueFileFilter.html#INSTANCE"><code>TrueFileFilter.INSTANCE</code></a> to match all directories.</dd>
  1613. <dt><span class="returnLabel">Returns:</span></dt>
  1614. <dd>a collection of java.io.File with the matching files</dd>
  1615. <dt><span class="seeLabel">See Also:</span></dt>
  1616. <dd><a href="../../../../org/apache/commons/io/filefilter/FileFilterUtils.html" title="class in org.apache.commons.io.filefilter"><code>FileFilterUtils</code></a>,
  1617. <a href="../../../../org/apache/commons/io/filefilter/NameFileFilter.html" title="class in org.apache.commons.io.filefilter"><code>NameFileFilter</code></a></dd>
  1618. </dl>
  1619. </li>
  1620. </ul>
  1621. <a name="listFilesAndDirs-java.io.File-org.apache.commons.io.filefilter.IOFileFilter-org.apache.commons.io.filefilter.IOFileFilter-">
  1622. <!-- -->
  1623. </a>
  1624. <ul class="blockList">
  1625. <li class="blockList">
  1626. <h4>listFilesAndDirs</h4>
  1627. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;&nbsp;listFilesAndDirs(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  1628. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;fileFilter,
  1629. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;dirFilter)</pre>
  1630. <div class="block">Finds files within a given directory (and optionally its
  1631. subdirectories). All files found are filtered by an IOFileFilter.
  1632. <p>
  1633. The resulting collection includes the starting directory and
  1634. any subdirectories that match the directory filter.
  1635. <p></div>
  1636. <dl>
  1637. <dt><span class="paramLabel">Parameters:</span></dt>
  1638. <dd><code>directory</code> - the directory to search in</dd>
  1639. <dd><code>fileFilter</code> - filter to apply when finding files.</dd>
  1640. <dd><code>dirFilter</code> - optional filter to apply when finding subdirectories.
  1641. If this parameter is <code>null</code>, subdirectories will not be included in the
  1642. search. Use TrueFileFilter.INSTANCE to match all directories.</dd>
  1643. <dt><span class="returnLabel">Returns:</span></dt>
  1644. <dd>a collection of java.io.File with the matching files</dd>
  1645. <dt><span class="simpleTagLabel">Since:</span></dt>
  1646. <dd>2.2</dd>
  1647. <dt><span class="seeLabel">See Also:</span></dt>
  1648. <dd><a href="../../../../org/apache/commons/io/FileUtils.html#listFiles-java.io.File-org.apache.commons.io.filefilter.IOFileFilter-org.apache.commons.io.filefilter.IOFileFilter-"><code>listFiles(java.io.File, org.apache.commons.io.filefilter.IOFileFilter, org.apache.commons.io.filefilter.IOFileFilter)</code></a>,
  1649. <a href="../../../../org/apache/commons/io/filefilter/FileFilterUtils.html" title="class in org.apache.commons.io.filefilter"><code>FileFilterUtils</code></a>,
  1650. <a href="../../../../org/apache/commons/io/filefilter/NameFileFilter.html" title="class in org.apache.commons.io.filefilter"><code>NameFileFilter</code></a></dd>
  1651. </dl>
  1652. </li>
  1653. </ul>
  1654. <a name="iterateFiles-java.io.File-org.apache.commons.io.filefilter.IOFileFilter-org.apache.commons.io.filefilter.IOFileFilter-">
  1655. <!-- -->
  1656. </a>
  1657. <ul class="blockList">
  1658. <li class="blockList">
  1659. <h4>iterateFiles</h4>
  1660. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;&nbsp;iterateFiles(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  1661. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;fileFilter,
  1662. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;dirFilter)</pre>
  1663. <div class="block">Allows iteration over the files in given directory (and optionally
  1664. its subdirectories).
  1665. <p>
  1666. All files found are filtered by an IOFileFilter. This method is
  1667. based on <a href="../../../../org/apache/commons/io/FileUtils.html#listFiles-java.io.File-org.apache.commons.io.filefilter.IOFileFilter-org.apache.commons.io.filefilter.IOFileFilter-"><code>listFiles(File, IOFileFilter, IOFileFilter)</code></a>,
  1668. which supports Iterable ('foreach' loop).
  1669. <p></div>
  1670. <dl>
  1671. <dt><span class="paramLabel">Parameters:</span></dt>
  1672. <dd><code>directory</code> - the directory to search in</dd>
  1673. <dd><code>fileFilter</code> - filter to apply when finding files.</dd>
  1674. <dd><code>dirFilter</code> - optional filter to apply when finding subdirectories.
  1675. If this parameter is <code>null</code>, subdirectories will not be included in the
  1676. search. Use TrueFileFilter.INSTANCE to match all directories.</dd>
  1677. <dt><span class="returnLabel">Returns:</span></dt>
  1678. <dd>an iterator of java.io.File for the matching files</dd>
  1679. <dt><span class="simpleTagLabel">Since:</span></dt>
  1680. <dd>1.2</dd>
  1681. <dt><span class="seeLabel">See Also:</span></dt>
  1682. <dd><a href="../../../../org/apache/commons/io/filefilter/FileFilterUtils.html" title="class in org.apache.commons.io.filefilter"><code>FileFilterUtils</code></a>,
  1683. <a href="../../../../org/apache/commons/io/filefilter/NameFileFilter.html" title="class in org.apache.commons.io.filefilter"><code>NameFileFilter</code></a></dd>
  1684. </dl>
  1685. </li>
  1686. </ul>
  1687. <a name="iterateFilesAndDirs-java.io.File-org.apache.commons.io.filefilter.IOFileFilter-org.apache.commons.io.filefilter.IOFileFilter-">
  1688. <!-- -->
  1689. </a>
  1690. <ul class="blockList">
  1691. <li class="blockList">
  1692. <h4>iterateFilesAndDirs</h4>
  1693. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;&nbsp;iterateFilesAndDirs(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  1694. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;fileFilter,
  1695. <a href="../../../../org/apache/commons/io/filefilter/IOFileFilter.html" title="interface in org.apache.commons.io.filefilter">IOFileFilter</a>&nbsp;dirFilter)</pre>
  1696. <div class="block">Allows iteration over the files in given directory (and optionally
  1697. its subdirectories).
  1698. <p>
  1699. All files found are filtered by an IOFileFilter. This method is
  1700. based on <a href="../../../../org/apache/commons/io/FileUtils.html#listFilesAndDirs-java.io.File-org.apache.commons.io.filefilter.IOFileFilter-org.apache.commons.io.filefilter.IOFileFilter-"><code>listFilesAndDirs(File, IOFileFilter, IOFileFilter)</code></a>,
  1701. which supports Iterable ('foreach' loop).
  1702. <p>
  1703. The resulting iterator includes the subdirectories themselves.</div>
  1704. <dl>
  1705. <dt><span class="paramLabel">Parameters:</span></dt>
  1706. <dd><code>directory</code> - the directory to search in</dd>
  1707. <dd><code>fileFilter</code> - filter to apply when finding files.</dd>
  1708. <dd><code>dirFilter</code> - optional filter to apply when finding subdirectories.
  1709. If this parameter is <code>null</code>, subdirectories will not be included in the
  1710. search. Use TrueFileFilter.INSTANCE to match all directories.</dd>
  1711. <dt><span class="returnLabel">Returns:</span></dt>
  1712. <dd>an iterator of java.io.File for the matching files</dd>
  1713. <dt><span class="simpleTagLabel">Since:</span></dt>
  1714. <dd>2.2</dd>
  1715. <dt><span class="seeLabel">See Also:</span></dt>
  1716. <dd><a href="../../../../org/apache/commons/io/filefilter/FileFilterUtils.html" title="class in org.apache.commons.io.filefilter"><code>FileFilterUtils</code></a>,
  1717. <a href="../../../../org/apache/commons/io/filefilter/NameFileFilter.html" title="class in org.apache.commons.io.filefilter"><code>NameFileFilter</code></a></dd>
  1718. </dl>
  1719. </li>
  1720. </ul>
  1721. <a name="listFiles-java.io.File-java.lang.String:A-boolean-">
  1722. <!-- -->
  1723. </a>
  1724. <ul class="blockList">
  1725. <li class="blockList">
  1726. <h4>listFiles</h4>
  1727. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;&nbsp;listFiles(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  1728. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;extensions,
  1729. boolean&nbsp;recursive)</pre>
  1730. <div class="block">Finds files within a given directory (and optionally its subdirectories)
  1731. which match an array of extensions.</div>
  1732. <dl>
  1733. <dt><span class="paramLabel">Parameters:</span></dt>
  1734. <dd><code>directory</code> - the directory to search in</dd>
  1735. <dd><code>extensions</code> - an array of extensions, ex. {"java","xml"}. If this
  1736. parameter is <code>null</code>, all files are returned.</dd>
  1737. <dd><code>recursive</code> - if true all subdirectories are searched as well</dd>
  1738. <dt><span class="returnLabel">Returns:</span></dt>
  1739. <dd>a collection of java.io.File with the matching files</dd>
  1740. </dl>
  1741. </li>
  1742. </ul>
  1743. <a name="iterateFiles-java.io.File-java.lang.String:A-boolean-">
  1744. <!-- -->
  1745. </a>
  1746. <ul class="blockList">
  1747. <li class="blockList">
  1748. <h4>iterateFiles</h4>
  1749. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;&nbsp;iterateFiles(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  1750. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;extensions,
  1751. boolean&nbsp;recursive)</pre>
  1752. <div class="block">Allows iteration over the files in a given directory (and optionally
  1753. its subdirectories) which match an array of extensions. This method
  1754. is based on <a href="../../../../org/apache/commons/io/FileUtils.html#listFiles-java.io.File-java.lang.String:A-boolean-"><code>listFiles(File, String[], boolean)</code></a>,
  1755. which supports Iterable ('foreach' loop).</div>
  1756. <dl>
  1757. <dt><span class="paramLabel">Parameters:</span></dt>
  1758. <dd><code>directory</code> - the directory to search in</dd>
  1759. <dd><code>extensions</code> - an array of extensions, ex. {"java","xml"}. If this
  1760. parameter is <code>null</code>, all files are returned.</dd>
  1761. <dd><code>recursive</code> - if true all subdirectories are searched as well</dd>
  1762. <dt><span class="returnLabel">Returns:</span></dt>
  1763. <dd>an iterator of java.io.File with the matching files</dd>
  1764. <dt><span class="simpleTagLabel">Since:</span></dt>
  1765. <dd>1.2</dd>
  1766. </dl>
  1767. </li>
  1768. </ul>
  1769. <a name="contentEquals-java.io.File-java.io.File-">
  1770. <!-- -->
  1771. </a>
  1772. <ul class="blockList">
  1773. <li class="blockList">
  1774. <h4>contentEquals</h4>
  1775. <pre>public static&nbsp;boolean&nbsp;contentEquals(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file1,
  1776. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file2)
  1777. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  1778. <div class="block">Compares the contents of two files to determine if they are equal or not.
  1779. <p>
  1780. This method checks to see if the two files are different lengths
  1781. or if they point to the same file, before resorting to byte-by-byte
  1782. comparison of the contents.
  1783. <p>
  1784. Code origin: Avalon</div>
  1785. <dl>
  1786. <dt><span class="paramLabel">Parameters:</span></dt>
  1787. <dd><code>file1</code> - the first file</dd>
  1788. <dd><code>file2</code> - the second file</dd>
  1789. <dt><span class="returnLabel">Returns:</span></dt>
  1790. <dd>true if the content of the files are equal or they both don't
  1791. exist, false otherwise</dd>
  1792. <dt><span class="throwsLabel">Throws:</span></dt>
  1793. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  1794. </dl>
  1795. </li>
  1796. </ul>
  1797. <a name="contentEqualsIgnoreEOL-java.io.File-java.io.File-java.lang.String-">
  1798. <!-- -->
  1799. </a>
  1800. <ul class="blockList">
  1801. <li class="blockList">
  1802. <h4>contentEqualsIgnoreEOL</h4>
  1803. <pre>public static&nbsp;boolean&nbsp;contentEqualsIgnoreEOL(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file1,
  1804. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file2,
  1805. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)
  1806. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  1807. <div class="block">Compares the contents of two files to determine if they are equal or not.
  1808. <p>
  1809. This method checks to see if the two files point to the same file,
  1810. before resorting to line-by-line comparison of the contents.
  1811. <p></div>
  1812. <dl>
  1813. <dt><span class="paramLabel">Parameters:</span></dt>
  1814. <dd><code>file1</code> - the first file</dd>
  1815. <dd><code>file2</code> - the second file</dd>
  1816. <dd><code>charsetName</code> - the character encoding to be used.
  1817. May be null, in which case the platform default is used</dd>
  1818. <dt><span class="returnLabel">Returns:</span></dt>
  1819. <dd>true if the content of the files are equal or neither exists,
  1820. false otherwise</dd>
  1821. <dt><span class="throwsLabel">Throws:</span></dt>
  1822. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  1823. <dt><span class="simpleTagLabel">Since:</span></dt>
  1824. <dd>2.2</dd>
  1825. <dt><span class="seeLabel">See Also:</span></dt>
  1826. <dd><a href="../../../../org/apache/commons/io/IOUtils.html#contentEqualsIgnoreEOL-java.io.Reader-java.io.Reader-"><code>IOUtils.contentEqualsIgnoreEOL(Reader, Reader)</code></a></dd>
  1827. </dl>
  1828. </li>
  1829. </ul>
  1830. <a name="toFile-java.net.URL-">
  1831. <!-- -->
  1832. </a>
  1833. <ul class="blockList">
  1834. <li class="blockList">
  1835. <h4>toFile</h4>
  1836. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;toFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url)</pre>
  1837. <div class="block">Convert from a <code>URL</code> to a <code>File</code>.
  1838. <p>
  1839. From version 1.1 this method will decode the URL.
  1840. Syntax such as <code>file:///my%20docs/file.txt</code> will be
  1841. correctly decoded to <code>/my docs/file.txt</code>. Starting with version
  1842. 1.5, this method uses UTF-8 to decode percent-encoded octets to characters.
  1843. Additionally, malformed percent-encoded octets are handled leniently by
  1844. passing them through literally.</div>
  1845. <dl>
  1846. <dt><span class="paramLabel">Parameters:</span></dt>
  1847. <dd><code>url</code> - the file URL to convert, <code>null</code> returns <code>null</code></dd>
  1848. <dt><span class="returnLabel">Returns:</span></dt>
  1849. <dd>the equivalent <code>File</code> object, or <code>null</code>
  1850. if the URL's protocol is not <code>file</code></dd>
  1851. </dl>
  1852. </li>
  1853. </ul>
  1854. <a name="toFiles-java.net.URL:A-">
  1855. <!-- -->
  1856. </a>
  1857. <ul class="blockList">
  1858. <li class="blockList">
  1859. <h4>toFiles</h4>
  1860. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>[]&nbsp;toFiles(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>[]&nbsp;urls)</pre>
  1861. <div class="block">Converts each of an array of <code>URL</code> to a <code>File</code>.
  1862. <p>
  1863. Returns an array of the same size as the input.
  1864. If the input is <code>null</code>, an empty array is returned.
  1865. If the input contains <code>null</code>, the output array contains <code>null</code> at the same
  1866. index.
  1867. <p>
  1868. This method will decode the URL.
  1869. Syntax such as <code>file:///my%20docs/file.txt</code> will be
  1870. correctly decoded to <code>/my docs/file.txt</code>.</div>
  1871. <dl>
  1872. <dt><span class="paramLabel">Parameters:</span></dt>
  1873. <dd><code>urls</code> - the file URLs to convert, <code>null</code> returns empty array</dd>
  1874. <dt><span class="returnLabel">Returns:</span></dt>
  1875. <dd>a non-<code>null</code> array of Files matching the input, with a <code>null</code> item
  1876. if there was a <code>null</code> at that index in the input array</dd>
  1877. <dt><span class="throwsLabel">Throws:</span></dt>
  1878. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if any file is not a URL file</dd>
  1879. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if any file is incorrectly encoded</dd>
  1880. <dt><span class="simpleTagLabel">Since:</span></dt>
  1881. <dd>1.1</dd>
  1882. </dl>
  1883. </li>
  1884. </ul>
  1885. <a name="toURLs-java.io.File:A-">
  1886. <!-- -->
  1887. </a>
  1888. <ul class="blockList">
  1889. <li class="blockList">
  1890. <h4>toURLs</h4>
  1891. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>[]&nbsp;toURLs(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>[]&nbsp;files)
  1892. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  1893. <div class="block">Converts each of an array of <code>File</code> to a <code>URL</code>.
  1894. <p>
  1895. Returns an array of the same size as the input.</div>
  1896. <dl>
  1897. <dt><span class="paramLabel">Parameters:</span></dt>
  1898. <dd><code>files</code> - the files to convert, must not be <code>null</code></dd>
  1899. <dt><span class="returnLabel">Returns:</span></dt>
  1900. <dd>an array of URLs matching the input</dd>
  1901. <dt><span class="throwsLabel">Throws:</span></dt>
  1902. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a file cannot be converted</dd>
  1903. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the parameter is null</dd>
  1904. </dl>
  1905. </li>
  1906. </ul>
  1907. <a name="copyFileToDirectory-java.io.File-java.io.File-">
  1908. <!-- -->
  1909. </a>
  1910. <ul class="blockList">
  1911. <li class="blockList">
  1912. <h4>copyFileToDirectory</h4>
  1913. <pre>public static&nbsp;void&nbsp;copyFileToDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcFile,
  1914. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir)
  1915. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  1916. <div class="block">Copies a file to a directory preserving the file date.
  1917. <p>
  1918. This method copies the contents of the specified source file
  1919. to a file of the same name in the specified destination directory.
  1920. The destination directory is created if it does not exist.
  1921. If the destination file exists, then this method will overwrite it.
  1922. <p>
  1923. <strong>Note:</strong> This method tries to preserve the file's last
  1924. modified date/times using <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true#setLastModified-long-" title="class or interface in java.io"><code>File.setLastModified(long)</code></a>, however
  1925. it is not guaranteed that the operation will succeed.
  1926. If the modification operation fails, no indication is provided.</div>
  1927. <dl>
  1928. <dt><span class="paramLabel">Parameters:</span></dt>
  1929. <dd><code>srcFile</code> - an existing file to copy, must not be <code>null</code></dd>
  1930. <dd><code>destDir</code> - the directory to place the copy in, must not be <code>null</code></dd>
  1931. <dt><span class="throwsLabel">Throws:</span></dt>
  1932. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is null</dd>
  1933. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  1934. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs during copying</dd>
  1935. <dt><span class="seeLabel">See Also:</span></dt>
  1936. <dd><a href="../../../../org/apache/commons/io/FileUtils.html#copyFile-java.io.File-java.io.File-boolean-"><code>copyFile(File, File, boolean)</code></a></dd>
  1937. </dl>
  1938. </li>
  1939. </ul>
  1940. <a name="copyFileToDirectory-java.io.File-java.io.File-boolean-">
  1941. <!-- -->
  1942. </a>
  1943. <ul class="blockList">
  1944. <li class="blockList">
  1945. <h4>copyFileToDirectory</h4>
  1946. <pre>public static&nbsp;void&nbsp;copyFileToDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcFile,
  1947. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir,
  1948. boolean&nbsp;preserveFileDate)
  1949. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  1950. <div class="block">Copies a file to a directory optionally preserving the file date.
  1951. <p>
  1952. This method copies the contents of the specified source file
  1953. to a file of the same name in the specified destination directory.
  1954. The destination directory is created if it does not exist.
  1955. If the destination file exists, then this method will overwrite it.
  1956. <p>
  1957. <strong>Note:</strong> Setting <code>preserveFileDate</code> to
  1958. <code>true</code> tries to preserve the file's last modified
  1959. date/times using <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true#setLastModified-long-" title="class or interface in java.io"><code>File.setLastModified(long)</code></a>, however it is
  1960. not guaranteed that the operation will succeed.
  1961. If the modification operation fails, no indication is provided.</div>
  1962. <dl>
  1963. <dt><span class="paramLabel">Parameters:</span></dt>
  1964. <dd><code>srcFile</code> - an existing file to copy, must not be <code>null</code></dd>
  1965. <dd><code>destDir</code> - the directory to place the copy in, must not be <code>null</code></dd>
  1966. <dd><code>preserveFileDate</code> - true if the file date of the copy
  1967. should be the same as the original</dd>
  1968. <dt><span class="throwsLabel">Throws:</span></dt>
  1969. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is <code>null</code></dd>
  1970. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  1971. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs during copying</dd>
  1972. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the output file length is not the same as the input file length after the copy
  1973. completes</dd>
  1974. <dt><span class="simpleTagLabel">Since:</span></dt>
  1975. <dd>1.3</dd>
  1976. <dt><span class="seeLabel">See Also:</span></dt>
  1977. <dd><a href="../../../../org/apache/commons/io/FileUtils.html#copyFile-java.io.File-java.io.File-boolean-"><code>copyFile(File, File, boolean)</code></a></dd>
  1978. </dl>
  1979. </li>
  1980. </ul>
  1981. <a name="copyFile-java.io.File-java.io.File-">
  1982. <!-- -->
  1983. </a>
  1984. <ul class="blockList">
  1985. <li class="blockList">
  1986. <h4>copyFile</h4>
  1987. <pre>public static&nbsp;void&nbsp;copyFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcFile,
  1988. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destFile)
  1989. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  1990. <div class="block">Copies a file to a new location preserving the file date.
  1991. <p>
  1992. This method copies the contents of the specified source file to the
  1993. specified destination file. The directory holding the destination file is
  1994. created if it does not exist. If the destination file exists, then this
  1995. method will overwrite it.
  1996. <p>
  1997. <strong>Note:</strong> This method tries to preserve the file's last
  1998. modified date/times using <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true#setLastModified-long-" title="class or interface in java.io"><code>File.setLastModified(long)</code></a>, however
  1999. it is not guaranteed that the operation will succeed.
  2000. If the modification operation fails, no indication is provided.</div>
  2001. <dl>
  2002. <dt><span class="paramLabel">Parameters:</span></dt>
  2003. <dd><code>srcFile</code> - an existing file to copy, must not be <code>null</code></dd>
  2004. <dd><code>destFile</code> - the new file, must not be <code>null</code></dd>
  2005. <dt><span class="throwsLabel">Throws:</span></dt>
  2006. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is <code>null</code></dd>
  2007. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  2008. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs during copying</dd>
  2009. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the output file length is not the same as the input file length after the copy
  2010. completes</dd>
  2011. <dt><span class="seeLabel">See Also:</span></dt>
  2012. <dd><a href="../../../../org/apache/commons/io/FileUtils.html#copyFileToDirectory-java.io.File-java.io.File-"><code>copyFileToDirectory(File, File)</code></a>,
  2013. <a href="../../../../org/apache/commons/io/FileUtils.html#copyFile-java.io.File-java.io.File-boolean-"><code>copyFile(File, File, boolean)</code></a></dd>
  2014. </dl>
  2015. </li>
  2016. </ul>
  2017. <a name="copyFile-java.io.File-java.io.File-boolean-">
  2018. <!-- -->
  2019. </a>
  2020. <ul class="blockList">
  2021. <li class="blockList">
  2022. <h4>copyFile</h4>
  2023. <pre>public static&nbsp;void&nbsp;copyFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcFile,
  2024. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destFile,
  2025. boolean&nbsp;preserveFileDate)
  2026. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2027. <div class="block">Copies a file to a new location.
  2028. <p>
  2029. This method copies the contents of the specified source file
  2030. to the specified destination file.
  2031. The directory holding the destination file is created if it does not exist.
  2032. If the destination file exists, then this method will overwrite it.
  2033. <p>
  2034. <strong>Note:</strong> Setting <code>preserveFileDate</code> to
  2035. <code>true</code> tries to preserve the file's last modified
  2036. date/times using <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true#setLastModified-long-" title="class or interface in java.io"><code>File.setLastModified(long)</code></a>, however it is
  2037. not guaranteed that the operation will succeed.
  2038. If the modification operation fails, no indication is provided.</div>
  2039. <dl>
  2040. <dt><span class="paramLabel">Parameters:</span></dt>
  2041. <dd><code>srcFile</code> - an existing file to copy, must not be <code>null</code></dd>
  2042. <dd><code>destFile</code> - the new file, must not be <code>null</code></dd>
  2043. <dd><code>preserveFileDate</code> - true if the file date of the copy
  2044. should be the same as the original</dd>
  2045. <dt><span class="throwsLabel">Throws:</span></dt>
  2046. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is <code>null</code></dd>
  2047. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  2048. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs during copying</dd>
  2049. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the output file length is not the same as the input file length after the copy
  2050. completes</dd>
  2051. <dt><span class="seeLabel">See Also:</span></dt>
  2052. <dd><a href="../../../../org/apache/commons/io/FileUtils.html#copyFileToDirectory-java.io.File-java.io.File-boolean-"><code>copyFileToDirectory(File, File, boolean)</code></a>,
  2053. <a href="../../../../org/apache/commons/io/FileUtils.html#doCopyFile-java.io.File-java.io.File-boolean-"><code>doCopyFile(File, File, boolean)</code></a></dd>
  2054. </dl>
  2055. </li>
  2056. </ul>
  2057. <a name="copyFile-java.io.File-java.io.OutputStream-">
  2058. <!-- -->
  2059. </a>
  2060. <ul class="blockList">
  2061. <li class="blockList">
  2062. <h4>copyFile</h4>
  2063. <pre>public static&nbsp;long&nbsp;copyFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;input,
  2064. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output)
  2065. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2066. <div class="block">Copy bytes from a <code>File</code> to an <code>OutputStream</code>.
  2067. <p>
  2068. This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>.
  2069. </p></div>
  2070. <dl>
  2071. <dt><span class="paramLabel">Parameters:</span></dt>
  2072. <dd><code>input</code> - the <code>File</code> to read from</dd>
  2073. <dd><code>output</code> - the <code>OutputStream</code> to write to</dd>
  2074. <dt><span class="returnLabel">Returns:</span></dt>
  2075. <dd>the number of bytes copied</dd>
  2076. <dt><span class="throwsLabel">Throws:</span></dt>
  2077. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input or output is null</dd>
  2078. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  2079. <dt><span class="simpleTagLabel">Since:</span></dt>
  2080. <dd>2.1</dd>
  2081. </dl>
  2082. </li>
  2083. </ul>
  2084. <a name="copyDirectoryToDirectory-java.io.File-java.io.File-">
  2085. <!-- -->
  2086. </a>
  2087. <ul class="blockList">
  2088. <li class="blockList">
  2089. <h4>copyDirectoryToDirectory</h4>
  2090. <pre>public static&nbsp;void&nbsp;copyDirectoryToDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcDir,
  2091. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir)
  2092. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2093. <div class="block">Copies a directory to within another directory preserving the file dates.
  2094. <p>
  2095. This method copies the source directory and all its contents to a
  2096. directory of the same name in the specified destination directory.
  2097. <p>
  2098. The destination directory is created if it does not exist.
  2099. If the destination directory did exist, then this method merges
  2100. the source with the destination, with the source taking precedence.
  2101. <p>
  2102. <strong>Note:</strong> This method tries to preserve the files' last
  2103. modified date/times using <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true#setLastModified-long-" title="class or interface in java.io"><code>File.setLastModified(long)</code></a>, however
  2104. it is not guaranteed that those operations will succeed.
  2105. If the modification operation fails, no indication is provided.</div>
  2106. <dl>
  2107. <dt><span class="paramLabel">Parameters:</span></dt>
  2108. <dd><code>srcDir</code> - an existing directory to copy, must not be <code>null</code></dd>
  2109. <dd><code>destDir</code> - the directory to place the copy in, must not be <code>null</code></dd>
  2110. <dt><span class="throwsLabel">Throws:</span></dt>
  2111. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is <code>null</code></dd>
  2112. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  2113. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs during copying</dd>
  2114. <dt><span class="simpleTagLabel">Since:</span></dt>
  2115. <dd>1.2</dd>
  2116. </dl>
  2117. </li>
  2118. </ul>
  2119. <a name="copyDirectory-java.io.File-java.io.File-">
  2120. <!-- -->
  2121. </a>
  2122. <ul class="blockList">
  2123. <li class="blockList">
  2124. <h4>copyDirectory</h4>
  2125. <pre>public static&nbsp;void&nbsp;copyDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcDir,
  2126. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir)
  2127. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2128. <div class="block">Copies a whole directory to a new location preserving the file dates.
  2129. <p>
  2130. This method copies the specified directory and all its child
  2131. directories and files to the specified destination.
  2132. The destination is the new location and name of the directory.
  2133. <p>
  2134. The destination directory is created if it does not exist.
  2135. If the destination directory did exist, then this method merges
  2136. the source with the destination, with the source taking precedence.
  2137. <p>
  2138. <strong>Note:</strong> This method tries to preserve the files' last
  2139. modified date/times using <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true#setLastModified-long-" title="class or interface in java.io"><code>File.setLastModified(long)</code></a>, however
  2140. it is not guaranteed that those operations will succeed.
  2141. If the modification operation fails, no indication is provided.</div>
  2142. <dl>
  2143. <dt><span class="paramLabel">Parameters:</span></dt>
  2144. <dd><code>srcDir</code> - an existing directory to copy, must not be <code>null</code></dd>
  2145. <dd><code>destDir</code> - the new directory, must not be <code>null</code></dd>
  2146. <dt><span class="throwsLabel">Throws:</span></dt>
  2147. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is <code>null</code></dd>
  2148. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  2149. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs during copying</dd>
  2150. <dt><span class="simpleTagLabel">Since:</span></dt>
  2151. <dd>1.1</dd>
  2152. </dl>
  2153. </li>
  2154. </ul>
  2155. <a name="copyDirectory-java.io.File-java.io.File-boolean-">
  2156. <!-- -->
  2157. </a>
  2158. <ul class="blockList">
  2159. <li class="blockList">
  2160. <h4>copyDirectory</h4>
  2161. <pre>public static&nbsp;void&nbsp;copyDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcDir,
  2162. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir,
  2163. boolean&nbsp;preserveFileDate)
  2164. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2165. <div class="block">Copies a whole directory to a new location.
  2166. <p>
  2167. This method copies the contents of the specified source directory
  2168. to within the specified destination directory.
  2169. <p>
  2170. The destination directory is created if it does not exist.
  2171. If the destination directory did exist, then this method merges
  2172. the source with the destination, with the source taking precedence.
  2173. <p>
  2174. <strong>Note:</strong> Setting <code>preserveFileDate</code> to
  2175. <code>true</code> tries to preserve the files' last modified
  2176. date/times using <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true#setLastModified-long-" title="class or interface in java.io"><code>File.setLastModified(long)</code></a>, however it is
  2177. not guaranteed that those operations will succeed.
  2178. If the modification operation fails, no indication is provided.</div>
  2179. <dl>
  2180. <dt><span class="paramLabel">Parameters:</span></dt>
  2181. <dd><code>srcDir</code> - an existing directory to copy, must not be <code>null</code></dd>
  2182. <dd><code>destDir</code> - the new directory, must not be <code>null</code></dd>
  2183. <dd><code>preserveFileDate</code> - true if the file date of the copy
  2184. should be the same as the original</dd>
  2185. <dt><span class="throwsLabel">Throws:</span></dt>
  2186. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is <code>null</code></dd>
  2187. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  2188. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs during copying</dd>
  2189. <dt><span class="simpleTagLabel">Since:</span></dt>
  2190. <dd>1.1</dd>
  2191. </dl>
  2192. </li>
  2193. </ul>
  2194. <a name="copyDirectory-java.io.File-java.io.File-java.io.FileFilter-">
  2195. <!-- -->
  2196. </a>
  2197. <ul class="blockList">
  2198. <li class="blockList">
  2199. <h4>copyDirectory</h4>
  2200. <pre>public static&nbsp;void&nbsp;copyDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcDir,
  2201. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir,
  2202. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileFilter.html?is-external=true" title="class or interface in java.io">FileFilter</a>&nbsp;filter)
  2203. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2204. <div class="block">Copies a filtered directory to a new location preserving the file dates.
  2205. <p>
  2206. This method copies the contents of the specified source directory
  2207. to within the specified destination directory.
  2208. <p>
  2209. The destination directory is created if it does not exist.
  2210. If the destination directory did exist, then this method merges
  2211. the source with the destination, with the source taking precedence.
  2212. <p>
  2213. <strong>Note:</strong> This method tries to preserve the files' last
  2214. modified date/times using <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true#setLastModified-long-" title="class or interface in java.io"><code>File.setLastModified(long)</code></a>, however
  2215. it is not guaranteed that those operations will succeed.
  2216. If the modification operation fails, no indication is provided.
  2217. </p>
  2218. <h3>Example: Copy directories only</h3>
  2219. <pre>
  2220. // only copy the directory structure
  2221. FileUtils.copyDirectory(srcDir, destDir, DirectoryFileFilter.DIRECTORY);
  2222. </pre>
  2223. <h3>Example: Copy directories and txt files</h3>
  2224. <pre>
  2225. // Create a filter for ".txt" files
  2226. IOFileFilter txtSuffixFilter = FileFilterUtils.suffixFileFilter(".txt");
  2227. IOFileFilter txtFiles = FileFilterUtils.andFileFilter(FileFileFilter.FILE, txtSuffixFilter);
  2228. // Create a filter for either directories or ".txt" files
  2229. FileFilter filter = FileFilterUtils.orFileFilter(DirectoryFileFilter.DIRECTORY, txtFiles);
  2230. // Copy using the filter
  2231. FileUtils.copyDirectory(srcDir, destDir, filter);
  2232. </pre></div>
  2233. <dl>
  2234. <dt><span class="paramLabel">Parameters:</span></dt>
  2235. <dd><code>srcDir</code> - an existing directory to copy, must not be <code>null</code></dd>
  2236. <dd><code>destDir</code> - the new directory, must not be <code>null</code></dd>
  2237. <dd><code>filter</code> - the filter to apply, null means copy all directories and files
  2238. should be the same as the original</dd>
  2239. <dt><span class="throwsLabel">Throws:</span></dt>
  2240. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is <code>null</code></dd>
  2241. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  2242. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs during copying</dd>
  2243. <dt><span class="simpleTagLabel">Since:</span></dt>
  2244. <dd>1.4</dd>
  2245. </dl>
  2246. </li>
  2247. </ul>
  2248. <a name="copyDirectory-java.io.File-java.io.File-java.io.FileFilter-boolean-">
  2249. <!-- -->
  2250. </a>
  2251. <ul class="blockList">
  2252. <li class="blockList">
  2253. <h4>copyDirectory</h4>
  2254. <pre>public static&nbsp;void&nbsp;copyDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcDir,
  2255. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir,
  2256. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileFilter.html?is-external=true" title="class or interface in java.io">FileFilter</a>&nbsp;filter,
  2257. boolean&nbsp;preserveFileDate)
  2258. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2259. <div class="block">Copies a filtered directory to a new location.
  2260. <p>
  2261. This method copies the contents of the specified source directory
  2262. to within the specified destination directory.
  2263. <p>
  2264. The destination directory is created if it does not exist.
  2265. If the destination directory did exist, then this method merges
  2266. the source with the destination, with the source taking precedence.
  2267. <p>
  2268. <strong>Note:</strong> Setting <code>preserveFileDate</code> to
  2269. <code>true</code> tries to preserve the files' last modified
  2270. date/times using <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true#setLastModified-long-" title="class or interface in java.io"><code>File.setLastModified(long)</code></a>, however it is
  2271. not guaranteed that those operations will succeed.
  2272. If the modification operation fails, no indication is provided.
  2273. </p>
  2274. <h3>Example: Copy directories only</h3>
  2275. <pre>
  2276. // only copy the directory structure
  2277. FileUtils.copyDirectory(srcDir, destDir, DirectoryFileFilter.DIRECTORY, false);
  2278. </pre>
  2279. <h3>Example: Copy directories and txt files</h3>
  2280. <pre>
  2281. // Create a filter for ".txt" files
  2282. IOFileFilter txtSuffixFilter = FileFilterUtils.suffixFileFilter(".txt");
  2283. IOFileFilter txtFiles = FileFilterUtils.andFileFilter(FileFileFilter.FILE, txtSuffixFilter);
  2284. // Create a filter for either directories or ".txt" files
  2285. FileFilter filter = FileFilterUtils.orFileFilter(DirectoryFileFilter.DIRECTORY, txtFiles);
  2286. // Copy using the filter
  2287. FileUtils.copyDirectory(srcDir, destDir, filter, false);
  2288. </pre></div>
  2289. <dl>
  2290. <dt><span class="paramLabel">Parameters:</span></dt>
  2291. <dd><code>srcDir</code> - an existing directory to copy, must not be <code>null</code></dd>
  2292. <dd><code>destDir</code> - the new directory, must not be <code>null</code></dd>
  2293. <dd><code>filter</code> - the filter to apply, null means copy all directories and files</dd>
  2294. <dd><code>preserveFileDate</code> - true if the file date of the copy
  2295. should be the same as the original</dd>
  2296. <dt><span class="throwsLabel">Throws:</span></dt>
  2297. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is <code>null</code></dd>
  2298. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  2299. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs during copying</dd>
  2300. <dt><span class="simpleTagLabel">Since:</span></dt>
  2301. <dd>1.4</dd>
  2302. </dl>
  2303. </li>
  2304. </ul>
  2305. <a name="copyURLToFile-java.net.URL-java.io.File-">
  2306. <!-- -->
  2307. </a>
  2308. <ul class="blockList">
  2309. <li class="blockList">
  2310. <h4>copyURLToFile</h4>
  2311. <pre>public static&nbsp;void&nbsp;copyURLToFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;source,
  2312. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destination)
  2313. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2314. <div class="block">Copies bytes from the URL <code>source</code> to a file
  2315. <code>destination</code>. The directories up to <code>destination</code>
  2316. will be created if they don't already exist. <code>destination</code>
  2317. will be overwritten if it already exists.
  2318. <p>
  2319. Warning: this method does not set a connection or read timeout and thus
  2320. might block forever. Use <a href="../../../../org/apache/commons/io/FileUtils.html#copyURLToFile-java.net.URL-java.io.File-int-int-"><code>copyURLToFile(URL, File, int, int)</code></a>
  2321. with reasonable timeouts to prevent this.</div>
  2322. <dl>
  2323. <dt><span class="paramLabel">Parameters:</span></dt>
  2324. <dd><code>source</code> - the <code>URL</code> to copy bytes from, must not be <code>null</code></dd>
  2325. <dd><code>destination</code> - the non-directory <code>File</code> to write bytes to
  2326. (possibly overwriting), must not be <code>null</code></dd>
  2327. <dt><span class="throwsLabel">Throws:</span></dt>
  2328. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if <code>source</code> URL cannot be opened</dd>
  2329. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if <code>destination</code> is a directory</dd>
  2330. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if <code>destination</code> cannot be written</dd>
  2331. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if <code>destination</code> needs creating but can't be</dd>
  2332. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs during copying</dd>
  2333. </dl>
  2334. </li>
  2335. </ul>
  2336. <a name="copyURLToFile-java.net.URL-java.io.File-int-int-">
  2337. <!-- -->
  2338. </a>
  2339. <ul class="blockList">
  2340. <li class="blockList">
  2341. <h4>copyURLToFile</h4>
  2342. <pre>public static&nbsp;void&nbsp;copyURLToFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;source,
  2343. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destination,
  2344. int&nbsp;connectionTimeout,
  2345. int&nbsp;readTimeout)
  2346. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2347. <div class="block">Copies bytes from the URL <code>source</code> to a file
  2348. <code>destination</code>. The directories up to <code>destination</code>
  2349. will be created if they don't already exist. <code>destination</code>
  2350. will be overwritten if it already exists.</div>
  2351. <dl>
  2352. <dt><span class="paramLabel">Parameters:</span></dt>
  2353. <dd><code>source</code> - the <code>URL</code> to copy bytes from, must not be <code>null</code></dd>
  2354. <dd><code>destination</code> - the non-directory <code>File</code> to write bytes to
  2355. (possibly overwriting), must not be <code>null</code></dd>
  2356. <dd><code>connectionTimeout</code> - the number of milliseconds until this method
  2357. will timeout if no connection could be established to the <code>source</code></dd>
  2358. <dd><code>readTimeout</code> - the number of milliseconds until this method will
  2359. timeout if no data could be read from the <code>source</code></dd>
  2360. <dt><span class="throwsLabel">Throws:</span></dt>
  2361. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if <code>source</code> URL cannot be opened</dd>
  2362. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if <code>destination</code> is a directory</dd>
  2363. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if <code>destination</code> cannot be written</dd>
  2364. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if <code>destination</code> needs creating but can't be</dd>
  2365. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs during copying</dd>
  2366. <dt><span class="simpleTagLabel">Since:</span></dt>
  2367. <dd>2.0</dd>
  2368. </dl>
  2369. </li>
  2370. </ul>
  2371. <a name="copyInputStreamToFile-java.io.InputStream-java.io.File-">
  2372. <!-- -->
  2373. </a>
  2374. <ul class="blockList">
  2375. <li class="blockList">
  2376. <h4>copyInputStreamToFile</h4>
  2377. <pre>public static&nbsp;void&nbsp;copyInputStreamToFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;source,
  2378. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destination)
  2379. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2380. <div class="block">Copies bytes from an <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a> <code>source</code> to a file
  2381. <code>destination</code>. The directories up to <code>destination</code>
  2382. will be created if they don't already exist. <code>destination</code>
  2383. will be overwritten if it already exists.
  2384. The <code>source</code> stream is closed.
  2385. See <a href="../../../../org/apache/commons/io/FileUtils.html#copyToFile-java.io.InputStream-java.io.File-"><code>copyToFile(InputStream, File)</code></a> for a method that does not close the input stream.</div>
  2386. <dl>
  2387. <dt><span class="paramLabel">Parameters:</span></dt>
  2388. <dd><code>source</code> - the <code>InputStream</code> to copy bytes from, must not be <code>null</code>, will be closed</dd>
  2389. <dd><code>destination</code> - the non-directory <code>File</code> to write bytes to
  2390. (possibly overwriting), must not be <code>null</code></dd>
  2391. <dt><span class="throwsLabel">Throws:</span></dt>
  2392. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if <code>destination</code> is a directory</dd>
  2393. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if <code>destination</code> cannot be written</dd>
  2394. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if <code>destination</code> needs creating but can't be</dd>
  2395. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs during copying</dd>
  2396. <dt><span class="simpleTagLabel">Since:</span></dt>
  2397. <dd>2.0</dd>
  2398. </dl>
  2399. </li>
  2400. </ul>
  2401. <a name="copyToFile-java.io.InputStream-java.io.File-">
  2402. <!-- -->
  2403. </a>
  2404. <ul class="blockList">
  2405. <li class="blockList">
  2406. <h4>copyToFile</h4>
  2407. <pre>public static&nbsp;void&nbsp;copyToFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;source,
  2408. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destination)
  2409. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2410. <div class="block">Copies bytes from an <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a> <code>source</code> to a file
  2411. <code>destination</code>. The directories up to <code>destination</code>
  2412. will be created if they don't already exist. <code>destination</code>
  2413. will be overwritten if it already exists.
  2414. The <code>source</code> stream is left open, e.g. for use with <a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/ZipInputStream.html?is-external=true" title="class or interface in java.util.zip"><code>ZipInputStream</code></a>.
  2415. See <a href="../../../../org/apache/commons/io/FileUtils.html#copyInputStreamToFile-java.io.InputStream-java.io.File-"><code>copyInputStreamToFile(InputStream, File)</code></a> for a method that closes the input stream.</div>
  2416. <dl>
  2417. <dt><span class="paramLabel">Parameters:</span></dt>
  2418. <dd><code>source</code> - the <code>InputStream</code> to copy bytes from, must not be <code>null</code></dd>
  2419. <dd><code>destination</code> - the non-directory <code>File</code> to write bytes to
  2420. (possibly overwriting), must not be <code>null</code></dd>
  2421. <dt><span class="throwsLabel">Throws:</span></dt>
  2422. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if <code>destination</code> is a directory</dd>
  2423. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if <code>destination</code> cannot be written</dd>
  2424. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if <code>destination</code> needs creating but can't be</dd>
  2425. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs during copying</dd>
  2426. <dt><span class="simpleTagLabel">Since:</span></dt>
  2427. <dd>2.5</dd>
  2428. </dl>
  2429. </li>
  2430. </ul>
  2431. <a name="copyToDirectory-java.io.File-java.io.File-">
  2432. <!-- -->
  2433. </a>
  2434. <ul class="blockList">
  2435. <li class="blockList">
  2436. <h4>copyToDirectory</h4>
  2437. <pre>public static&nbsp;void&nbsp;copyToDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;src,
  2438. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir)
  2439. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2440. <div class="block">Copies a file or directory to within another directory preserving the file dates.
  2441. <p>
  2442. This method copies the source file or directory, along all its contents, to a
  2443. directory of the same name in the specified destination directory.
  2444. <p>
  2445. The destination directory is created if it does not exist.
  2446. If the destination directory did exist, then this method merges
  2447. the source with the destination, with the source taking precedence.
  2448. <p>
  2449. <strong>Note:</strong> This method tries to preserve the files' last
  2450. modified date/times using <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true#setLastModified-long-" title="class or interface in java.io"><code>File.setLastModified(long)</code></a>, however
  2451. it is not guaranteed that those operations will succeed.
  2452. If the modification operation fails, no indication is provided.</div>
  2453. <dl>
  2454. <dt><span class="paramLabel">Parameters:</span></dt>
  2455. <dd><code>src</code> - an existing file or directory to copy, must not be <code>null</code></dd>
  2456. <dd><code>destDir</code> - the directory to place the copy in, must not be <code>null</code></dd>
  2457. <dt><span class="throwsLabel">Throws:</span></dt>
  2458. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is <code>null</code></dd>
  2459. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  2460. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs during copying</dd>
  2461. <dt><span class="simpleTagLabel">Since:</span></dt>
  2462. <dd>2.6</dd>
  2463. <dt><span class="seeLabel">See Also:</span></dt>
  2464. <dd><a href="../../../../org/apache/commons/io/FileUtils.html#copyDirectoryToDirectory-java.io.File-java.io.File-"><code>copyDirectoryToDirectory(File, File)</code></a>,
  2465. <a href="../../../../org/apache/commons/io/FileUtils.html#copyFileToDirectory-java.io.File-java.io.File-"><code>copyFileToDirectory(File, File)</code></a></dd>
  2466. </dl>
  2467. </li>
  2468. </ul>
  2469. <a name="copyToDirectory-java.lang.Iterable-java.io.File-">
  2470. <!-- -->
  2471. </a>
  2472. <ul class="blockList">
  2473. <li class="blockList">
  2474. <h4>copyToDirectory</h4>
  2475. <pre>public static&nbsp;void&nbsp;copyToDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&gt;&nbsp;srcs,
  2476. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir)
  2477. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2478. <div class="block">Copies a files to a directory preserving each file's date.
  2479. <p>
  2480. This method copies the contents of the specified source files
  2481. to a file of the same name in the specified destination directory.
  2482. The destination directory is created if it does not exist.
  2483. If the destination file exists, then this method will overwrite it.
  2484. <p>
  2485. <strong>Note:</strong> This method tries to preserve the file's last
  2486. modified date/times using <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true#setLastModified-long-" title="class or interface in java.io"><code>File.setLastModified(long)</code></a>, however
  2487. it is not guaranteed that the operation will succeed.
  2488. If the modification operation fails, no indication is provided.</div>
  2489. <dl>
  2490. <dt><span class="paramLabel">Parameters:</span></dt>
  2491. <dd><code>srcs</code> - a existing files to copy, must not be <code>null</code></dd>
  2492. <dd><code>destDir</code> - the directory to place the copy in, must not be <code>null</code></dd>
  2493. <dt><span class="throwsLabel">Throws:</span></dt>
  2494. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is null</dd>
  2495. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  2496. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs during copying</dd>
  2497. <dt><span class="simpleTagLabel">Since:</span></dt>
  2498. <dd>2.6</dd>
  2499. <dt><span class="seeLabel">See Also:</span></dt>
  2500. <dd><a href="../../../../org/apache/commons/io/FileUtils.html#copyFileToDirectory-java.io.File-java.io.File-"><code>copyFileToDirectory(File, File)</code></a></dd>
  2501. </dl>
  2502. </li>
  2503. </ul>
  2504. <a name="deleteDirectory-java.io.File-">
  2505. <!-- -->
  2506. </a>
  2507. <ul class="blockList">
  2508. <li class="blockList">
  2509. <h4>deleteDirectory</h4>
  2510. <pre>public static&nbsp;void&nbsp;deleteDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory)
  2511. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2512. <div class="block">Deletes a directory recursively.</div>
  2513. <dl>
  2514. <dt><span class="paramLabel">Parameters:</span></dt>
  2515. <dd><code>directory</code> - directory to delete</dd>
  2516. <dt><span class="throwsLabel">Throws:</span></dt>
  2517. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case deletion is unsuccessful</dd>
  2518. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>directory</code> does not exist or is not a directory</dd>
  2519. </dl>
  2520. </li>
  2521. </ul>
  2522. <a name="deleteQuietly-java.io.File-">
  2523. <!-- -->
  2524. </a>
  2525. <ul class="blockList">
  2526. <li class="blockList">
  2527. <h4>deleteQuietly</h4>
  2528. <pre>public static&nbsp;boolean&nbsp;deleteQuietly(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</pre>
  2529. <div class="block">Deletes a file, never throwing an exception. If file is a directory, delete it and all sub-directories.
  2530. <p>
  2531. The difference between File.delete() and this method are:
  2532. <ul>
  2533. <li>A directory to be deleted does not have to be empty.</li>
  2534. <li>No exceptions are thrown when a file or directory cannot be deleted.</li>
  2535. </ul></div>
  2536. <dl>
  2537. <dt><span class="paramLabel">Parameters:</span></dt>
  2538. <dd><code>file</code> - file or directory to delete, can be <code>null</code></dd>
  2539. <dt><span class="returnLabel">Returns:</span></dt>
  2540. <dd><code>true</code> if the file or directory was deleted, otherwise
  2541. <code>false</code></dd>
  2542. <dt><span class="simpleTagLabel">Since:</span></dt>
  2543. <dd>1.4</dd>
  2544. </dl>
  2545. </li>
  2546. </ul>
  2547. <a name="directoryContains-java.io.File-java.io.File-">
  2548. <!-- -->
  2549. </a>
  2550. <ul class="blockList">
  2551. <li class="blockList">
  2552. <h4>directoryContains</h4>
  2553. <pre>public static&nbsp;boolean&nbsp;directoryContains(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory,
  2554. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;child)
  2555. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2556. <div class="block">Determines whether the <code>parent</code> directory contains the <code>child</code> element (a file or directory).
  2557. <p>
  2558. Files are normalized before comparison.
  2559. </p>
  2560. Edge cases:
  2561. <ul>
  2562. <li>A <code>directory</code> must not be null: if null, throw IllegalArgumentException</li>
  2563. <li>A <code>directory</code> must be a directory: if not a directory, throw IllegalArgumentException</li>
  2564. <li>A directory does not contain itself: return false</li>
  2565. <li>A null child file is not contained in any parent: return false</li>
  2566. </ul></div>
  2567. <dl>
  2568. <dt><span class="paramLabel">Parameters:</span></dt>
  2569. <dd><code>directory</code> - the file to consider as the parent.</dd>
  2570. <dd><code>child</code> - the file to consider as the child.</dd>
  2571. <dt><span class="returnLabel">Returns:</span></dt>
  2572. <dd>true is the candidate leaf is under by the specified composite. False otherwise.</dd>
  2573. <dt><span class="throwsLabel">Throws:</span></dt>
  2574. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs while checking the files.</dd>
  2575. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>directory</code> is null or not a directory.</dd>
  2576. <dt><span class="simpleTagLabel">Since:</span></dt>
  2577. <dd>2.2</dd>
  2578. <dt><span class="seeLabel">See Also:</span></dt>
  2579. <dd><a href="../../../../org/apache/commons/io/FilenameUtils.html#directoryContains-java.lang.String-java.lang.String-"><code>FilenameUtils.directoryContains(String, String)</code></a></dd>
  2580. </dl>
  2581. </li>
  2582. </ul>
  2583. <a name="cleanDirectory-java.io.File-">
  2584. <!-- -->
  2585. </a>
  2586. <ul class="blockList">
  2587. <li class="blockList">
  2588. <h4>cleanDirectory</h4>
  2589. <pre>public static&nbsp;void&nbsp;cleanDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory)
  2590. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2591. <div class="block">Cleans a directory without deleting it.</div>
  2592. <dl>
  2593. <dt><span class="paramLabel">Parameters:</span></dt>
  2594. <dd><code>directory</code> - directory to clean</dd>
  2595. <dt><span class="throwsLabel">Throws:</span></dt>
  2596. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case cleaning is unsuccessful</dd>
  2597. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>directory</code> does not exist or is not a directory</dd>
  2598. </dl>
  2599. </li>
  2600. </ul>
  2601. <a name="waitFor-java.io.File-int-">
  2602. <!-- -->
  2603. </a>
  2604. <ul class="blockList">
  2605. <li class="blockList">
  2606. <h4>waitFor</h4>
  2607. <pre>public static&nbsp;boolean&nbsp;waitFor(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  2608. int&nbsp;seconds)</pre>
  2609. <div class="block">Waits for NFS to propagate a file creation, imposing a timeout.
  2610. <p>
  2611. This method repeatedly tests <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true#exists--" title="class or interface in java.io"><code>File.exists()</code></a> until it returns
  2612. true up to the maximum time specified in seconds.</div>
  2613. <dl>
  2614. <dt><span class="paramLabel">Parameters:</span></dt>
  2615. <dd><code>file</code> - the file to check, must not be <code>null</code></dd>
  2616. <dd><code>seconds</code> - the maximum time in seconds to wait</dd>
  2617. <dt><span class="returnLabel">Returns:</span></dt>
  2618. <dd>true if file exists</dd>
  2619. <dt><span class="throwsLabel">Throws:</span></dt>
  2620. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the file is <code>null</code></dd>
  2621. </dl>
  2622. </li>
  2623. </ul>
  2624. <a name="readFileToString-java.io.File-java.nio.charset.Charset-">
  2625. <!-- -->
  2626. </a>
  2627. <ul class="blockList">
  2628. <li class="blockList">
  2629. <h4>readFileToString</h4>
  2630. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;readFileToString(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  2631. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  2632. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2633. <div class="block">Reads the contents of a file into a String.
  2634. The file is always closed.</div>
  2635. <dl>
  2636. <dt><span class="paramLabel">Parameters:</span></dt>
  2637. <dd><code>file</code> - the file to read, must not be <code>null</code></dd>
  2638. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  2639. <dt><span class="returnLabel">Returns:</span></dt>
  2640. <dd>the file contents, never <code>null</code></dd>
  2641. <dt><span class="throwsLabel">Throws:</span></dt>
  2642. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  2643. <dt><span class="simpleTagLabel">Since:</span></dt>
  2644. <dd>2.3</dd>
  2645. </dl>
  2646. </li>
  2647. </ul>
  2648. <a name="readFileToString-java.io.File-java.lang.String-">
  2649. <!-- -->
  2650. </a>
  2651. <ul class="blockList">
  2652. <li class="blockList">
  2653. <h4>readFileToString</h4>
  2654. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;readFileToString(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  2655. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  2656. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2657. <div class="block">Reads the contents of a file into a String. The file is always closed.</div>
  2658. <dl>
  2659. <dt><span class="paramLabel">Parameters:</span></dt>
  2660. <dd><code>file</code> - the file to read, must not be <code>null</code></dd>
  2661. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  2662. <dt><span class="returnLabel">Returns:</span></dt>
  2663. <dd>the file contents, never <code>null</code></dd>
  2664. <dt><span class="throwsLabel">Throws:</span></dt>
  2665. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  2666. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the encoding is not supported.</dd>
  2667. <dt><span class="simpleTagLabel">Since:</span></dt>
  2668. <dd>2.3</dd>
  2669. </dl>
  2670. </li>
  2671. </ul>
  2672. <a name="readFileToString-java.io.File-">
  2673. <!-- -->
  2674. </a>
  2675. <ul class="blockList">
  2676. <li class="blockList">
  2677. <h4>readFileToString</h4>
  2678. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  2679. public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;readFileToString(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
  2680. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2681. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/FileUtils.html#readFileToString-java.io.File-java.nio.charset.Charset-"><code>readFileToString(File, Charset)</code></a> instead (and specify the appropriate encoding)</span></div>
  2682. <div class="block">Reads the contents of a file into a String using the default encoding for the VM.
  2683. The file is always closed.</div>
  2684. <dl>
  2685. <dt><span class="paramLabel">Parameters:</span></dt>
  2686. <dd><code>file</code> - the file to read, must not be <code>null</code></dd>
  2687. <dt><span class="returnLabel">Returns:</span></dt>
  2688. <dd>the file contents, never <code>null</code></dd>
  2689. <dt><span class="throwsLabel">Throws:</span></dt>
  2690. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  2691. <dt><span class="simpleTagLabel">Since:</span></dt>
  2692. <dd>1.3.1</dd>
  2693. </dl>
  2694. </li>
  2695. </ul>
  2696. <a name="readFileToByteArray-java.io.File-">
  2697. <!-- -->
  2698. </a>
  2699. <ul class="blockList">
  2700. <li class="blockList">
  2701. <h4>readFileToByteArray</h4>
  2702. <pre>public static&nbsp;byte[]&nbsp;readFileToByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
  2703. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2704. <div class="block">Reads the contents of a file into a byte array.
  2705. The file is always closed.</div>
  2706. <dl>
  2707. <dt><span class="paramLabel">Parameters:</span></dt>
  2708. <dd><code>file</code> - the file to read, must not be <code>null</code></dd>
  2709. <dt><span class="returnLabel">Returns:</span></dt>
  2710. <dd>the file contents, never <code>null</code></dd>
  2711. <dt><span class="throwsLabel">Throws:</span></dt>
  2712. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  2713. <dt><span class="simpleTagLabel">Since:</span></dt>
  2714. <dd>1.1</dd>
  2715. </dl>
  2716. </li>
  2717. </ul>
  2718. <a name="readLines-java.io.File-java.nio.charset.Charset-">
  2719. <!-- -->
  2720. </a>
  2721. <ul class="blockList">
  2722. <li class="blockList">
  2723. <h4>readLines</h4>
  2724. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;readLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  2725. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  2726. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2727. <div class="block">Reads the contents of a file line by line to a List of Strings.
  2728. The file is always closed.</div>
  2729. <dl>
  2730. <dt><span class="paramLabel">Parameters:</span></dt>
  2731. <dd><code>file</code> - the file to read, must not be <code>null</code></dd>
  2732. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  2733. <dt><span class="returnLabel">Returns:</span></dt>
  2734. <dd>the list of Strings representing each line in the file, never <code>null</code></dd>
  2735. <dt><span class="throwsLabel">Throws:</span></dt>
  2736. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  2737. <dt><span class="simpleTagLabel">Since:</span></dt>
  2738. <dd>2.3</dd>
  2739. </dl>
  2740. </li>
  2741. </ul>
  2742. <a name="readLines-java.io.File-java.lang.String-">
  2743. <!-- -->
  2744. </a>
  2745. <ul class="blockList">
  2746. <li class="blockList">
  2747. <h4>readLines</h4>
  2748. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;readLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  2749. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  2750. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2751. <div class="block">Reads the contents of a file line by line to a List of Strings. The file is always closed.</div>
  2752. <dl>
  2753. <dt><span class="paramLabel">Parameters:</span></dt>
  2754. <dd><code>file</code> - the file to read, must not be <code>null</code></dd>
  2755. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  2756. <dt><span class="returnLabel">Returns:</span></dt>
  2757. <dd>the list of Strings representing each line in the file, never <code>null</code></dd>
  2758. <dt><span class="throwsLabel">Throws:</span></dt>
  2759. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  2760. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the encoding is not supported.</dd>
  2761. <dt><span class="simpleTagLabel">Since:</span></dt>
  2762. <dd>1.1</dd>
  2763. </dl>
  2764. </li>
  2765. </ul>
  2766. <a name="readLines-java.io.File-">
  2767. <!-- -->
  2768. </a>
  2769. <ul class="blockList">
  2770. <li class="blockList">
  2771. <h4>readLines</h4>
  2772. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  2773. public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;readLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
  2774. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2775. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/FileUtils.html#readLines-java.io.File-java.nio.charset.Charset-"><code>readLines(File, Charset)</code></a> instead (and specify the appropriate encoding)</span></div>
  2776. <div class="block">Reads the contents of a file line by line to a List of Strings using the default encoding for the VM.
  2777. The file is always closed.</div>
  2778. <dl>
  2779. <dt><span class="paramLabel">Parameters:</span></dt>
  2780. <dd><code>file</code> - the file to read, must not be <code>null</code></dd>
  2781. <dt><span class="returnLabel">Returns:</span></dt>
  2782. <dd>the list of Strings representing each line in the file, never <code>null</code></dd>
  2783. <dt><span class="throwsLabel">Throws:</span></dt>
  2784. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  2785. <dt><span class="simpleTagLabel">Since:</span></dt>
  2786. <dd>1.3</dd>
  2787. </dl>
  2788. </li>
  2789. </ul>
  2790. <a name="lineIterator-java.io.File-java.lang.String-">
  2791. <!-- -->
  2792. </a>
  2793. <ul class="blockList">
  2794. <li class="blockList">
  2795. <h4>lineIterator</h4>
  2796. <pre>public static&nbsp;<a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a>&nbsp;lineIterator(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  2797. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  2798. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2799. <div class="block">Returns an Iterator for the lines in a <code>File</code>.
  2800. <p>
  2801. This method opens an <code>InputStream</code> for the file.
  2802. When you have finished with the iterator you should close the stream
  2803. to free internal resources. This can be done by calling the
  2804. <a href="../../../../org/apache/commons/io/LineIterator.html#close--"><code>LineIterator.close()</code></a> or
  2805. <a href="../../../../org/apache/commons/io/LineIterator.html#closeQuietly-org.apache.commons.io.LineIterator-"><code>LineIterator.closeQuietly(LineIterator)</code></a> method.
  2806. <p>
  2807. The recommended usage pattern is:
  2808. <pre>
  2809. LineIterator it = FileUtils.lineIterator(file, "UTF-8");
  2810. try {
  2811. while (it.hasNext()) {
  2812. String line = it.nextLine();
  2813. /// do something with line
  2814. }
  2815. } finally {
  2816. LineIterator.closeQuietly(iterator);
  2817. }
  2818. </pre>
  2819. <p>
  2820. If an exception occurs during the creation of the iterator, the
  2821. underlying stream is closed.</div>
  2822. <dl>
  2823. <dt><span class="paramLabel">Parameters:</span></dt>
  2824. <dd><code>file</code> - the file to open for input, must not be <code>null</code></dd>
  2825. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  2826. <dt><span class="returnLabel">Returns:</span></dt>
  2827. <dd>an Iterator of the lines in the file, never <code>null</code></dd>
  2828. <dt><span class="throwsLabel">Throws:</span></dt>
  2829. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error (file closed)</dd>
  2830. <dt><span class="simpleTagLabel">Since:</span></dt>
  2831. <dd>1.2</dd>
  2832. </dl>
  2833. </li>
  2834. </ul>
  2835. <a name="lineIterator-java.io.File-">
  2836. <!-- -->
  2837. </a>
  2838. <ul class="blockList">
  2839. <li class="blockList">
  2840. <h4>lineIterator</h4>
  2841. <pre>public static&nbsp;<a href="../../../../org/apache/commons/io/LineIterator.html" title="class in org.apache.commons.io">LineIterator</a>&nbsp;lineIterator(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
  2842. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2843. <div class="block">Returns an Iterator for the lines in a <code>File</code> using the default encoding for the VM.</div>
  2844. <dl>
  2845. <dt><span class="paramLabel">Parameters:</span></dt>
  2846. <dd><code>file</code> - the file to open for input, must not be <code>null</code></dd>
  2847. <dt><span class="returnLabel">Returns:</span></dt>
  2848. <dd>an Iterator of the lines in the file, never <code>null</code></dd>
  2849. <dt><span class="throwsLabel">Throws:</span></dt>
  2850. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error (file closed)</dd>
  2851. <dt><span class="simpleTagLabel">Since:</span></dt>
  2852. <dd>1.3</dd>
  2853. <dt><span class="seeLabel">See Also:</span></dt>
  2854. <dd><a href="../../../../org/apache/commons/io/FileUtils.html#lineIterator-java.io.File-java.lang.String-"><code>lineIterator(File, String)</code></a></dd>
  2855. </dl>
  2856. </li>
  2857. </ul>
  2858. <a name="writeStringToFile-java.io.File-java.lang.String-java.nio.charset.Charset-">
  2859. <!-- -->
  2860. </a>
  2861. <ul class="blockList">
  2862. <li class="blockList">
  2863. <h4>writeStringToFile</h4>
  2864. <pre>public static&nbsp;void&nbsp;writeStringToFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  2865. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  2866. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  2867. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2868. <div class="block">Writes a String to a file creating the file if it does not exist.
  2869. <p>
  2870. NOTE: As from v1.3, the parent directories of the file will be created
  2871. if they do not exist.</div>
  2872. <dl>
  2873. <dt><span class="paramLabel">Parameters:</span></dt>
  2874. <dd><code>file</code> - the file to write</dd>
  2875. <dd><code>data</code> - the content to write to the file</dd>
  2876. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  2877. <dt><span class="throwsLabel">Throws:</span></dt>
  2878. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  2879. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - if the encoding is not supported by the VM</dd>
  2880. <dt><span class="simpleTagLabel">Since:</span></dt>
  2881. <dd>2.4</dd>
  2882. </dl>
  2883. </li>
  2884. </ul>
  2885. <a name="writeStringToFile-java.io.File-java.lang.String-java.lang.String-">
  2886. <!-- -->
  2887. </a>
  2888. <ul class="blockList">
  2889. <li class="blockList">
  2890. <h4>writeStringToFile</h4>
  2891. <pre>public static&nbsp;void&nbsp;writeStringToFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  2892. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  2893. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  2894. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2895. <div class="block">Writes a String to a file creating the file if it does not exist.
  2896. <p>
  2897. NOTE: As from v1.3, the parent directories of the file will be created
  2898. if they do not exist.</div>
  2899. <dl>
  2900. <dt><span class="paramLabel">Parameters:</span></dt>
  2901. <dd><code>file</code> - the file to write</dd>
  2902. <dd><code>data</code> - the content to write to the file</dd>
  2903. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  2904. <dt><span class="throwsLabel">Throws:</span></dt>
  2905. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  2906. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - if the encoding is not supported by the VM</dd>
  2907. </dl>
  2908. </li>
  2909. </ul>
  2910. <a name="writeStringToFile-java.io.File-java.lang.String-java.nio.charset.Charset-boolean-">
  2911. <!-- -->
  2912. </a>
  2913. <ul class="blockList">
  2914. <li class="blockList">
  2915. <h4>writeStringToFile</h4>
  2916. <pre>public static&nbsp;void&nbsp;writeStringToFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  2917. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  2918. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding,
  2919. boolean&nbsp;append)
  2920. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2921. <div class="block">Writes a String to a file creating the file if it does not exist.</div>
  2922. <dl>
  2923. <dt><span class="paramLabel">Parameters:</span></dt>
  2924. <dd><code>file</code> - the file to write</dd>
  2925. <dd><code>data</code> - the content to write to the file</dd>
  2926. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  2927. <dd><code>append</code> - if <code>true</code>, then the String will be added to the
  2928. end of the file rather than overwriting</dd>
  2929. <dt><span class="throwsLabel">Throws:</span></dt>
  2930. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  2931. <dt><span class="simpleTagLabel">Since:</span></dt>
  2932. <dd>2.3</dd>
  2933. </dl>
  2934. </li>
  2935. </ul>
  2936. <a name="writeStringToFile-java.io.File-java.lang.String-java.lang.String-boolean-">
  2937. <!-- -->
  2938. </a>
  2939. <ul class="blockList">
  2940. <li class="blockList">
  2941. <h4>writeStringToFile</h4>
  2942. <pre>public static&nbsp;void&nbsp;writeStringToFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  2943. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  2944. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding,
  2945. boolean&nbsp;append)
  2946. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2947. <div class="block">Writes a String to a file creating the file if it does not exist.</div>
  2948. <dl>
  2949. <dt><span class="paramLabel">Parameters:</span></dt>
  2950. <dd><code>file</code> - the file to write</dd>
  2951. <dd><code>data</code> - the content to write to the file</dd>
  2952. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  2953. <dd><code>append</code> - if <code>true</code>, then the String will be added to the
  2954. end of the file rather than overwriting</dd>
  2955. <dt><span class="throwsLabel">Throws:</span></dt>
  2956. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  2957. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the encoding is not supported by the VM</dd>
  2958. <dt><span class="simpleTagLabel">Since:</span></dt>
  2959. <dd>2.1</dd>
  2960. </dl>
  2961. </li>
  2962. </ul>
  2963. <a name="writeStringToFile-java.io.File-java.lang.String-">
  2964. <!-- -->
  2965. </a>
  2966. <ul class="blockList">
  2967. <li class="blockList">
  2968. <h4>writeStringToFile</h4>
  2969. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  2970. public static&nbsp;void&nbsp;writeStringToFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  2971. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data)
  2972. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2973. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/FileUtils.html#writeStringToFile-java.io.File-java.lang.String-java.nio.charset.Charset-"><code>writeStringToFile(File, String, Charset)</code></a> instead (and specify the appropriate encoding)</span></div>
  2974. <div class="block">Writes a String to a file creating the file if it does not exist using the default encoding for the VM.</div>
  2975. <dl>
  2976. <dt><span class="paramLabel">Parameters:</span></dt>
  2977. <dd><code>file</code> - the file to write</dd>
  2978. <dd><code>data</code> - the content to write to the file</dd>
  2979. <dt><span class="throwsLabel">Throws:</span></dt>
  2980. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  2981. </dl>
  2982. </li>
  2983. </ul>
  2984. <a name="writeStringToFile-java.io.File-java.lang.String-boolean-">
  2985. <!-- -->
  2986. </a>
  2987. <ul class="blockList">
  2988. <li class="blockList">
  2989. <h4>writeStringToFile</h4>
  2990. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  2991. public static&nbsp;void&nbsp;writeStringToFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  2992. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;data,
  2993. boolean&nbsp;append)
  2994. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  2995. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/FileUtils.html#writeStringToFile-java.io.File-java.lang.String-java.nio.charset.Charset-boolean-"><code>writeStringToFile(File, String, Charset, boolean)</code></a> instead (and specify the appropriate encoding)</span></div>
  2996. <div class="block">Writes a String to a file creating the file if it does not exist using the default encoding for the VM.</div>
  2997. <dl>
  2998. <dt><span class="paramLabel">Parameters:</span></dt>
  2999. <dd><code>file</code> - the file to write</dd>
  3000. <dd><code>data</code> - the content to write to the file</dd>
  3001. <dd><code>append</code> - if <code>true</code>, then the String will be added to the
  3002. end of the file rather than overwriting</dd>
  3003. <dt><span class="throwsLabel">Throws:</span></dt>
  3004. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3005. <dt><span class="simpleTagLabel">Since:</span></dt>
  3006. <dd>2.1</dd>
  3007. </dl>
  3008. </li>
  3009. </ul>
  3010. <a name="write-java.io.File-java.lang.CharSequence-">
  3011. <!-- -->
  3012. </a>
  3013. <ul class="blockList">
  3014. <li class="blockList">
  3015. <h4>write</h4>
  3016. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  3017. public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3018. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data)
  3019. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3020. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/FileUtils.html#write-java.io.File-java.lang.CharSequence-java.nio.charset.Charset-"><code>write(File, CharSequence, Charset)</code></a> instead (and specify the appropriate encoding)</span></div>
  3021. <div class="block">Writes a CharSequence to a file creating the file if it does not exist using the default encoding for the VM.</div>
  3022. <dl>
  3023. <dt><span class="paramLabel">Parameters:</span></dt>
  3024. <dd><code>file</code> - the file to write</dd>
  3025. <dd><code>data</code> - the content to write to the file</dd>
  3026. <dt><span class="throwsLabel">Throws:</span></dt>
  3027. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3028. <dt><span class="simpleTagLabel">Since:</span></dt>
  3029. <dd>2.0</dd>
  3030. </dl>
  3031. </li>
  3032. </ul>
  3033. <a name="write-java.io.File-java.lang.CharSequence-boolean-">
  3034. <!-- -->
  3035. </a>
  3036. <ul class="blockList">
  3037. <li class="blockList">
  3038. <h4>write</h4>
  3039. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  3040. public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3041. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  3042. boolean&nbsp;append)
  3043. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3044. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">2.5 use <a href="../../../../org/apache/commons/io/FileUtils.html#write-java.io.File-java.lang.CharSequence-java.nio.charset.Charset-boolean-"><code>write(File, CharSequence, Charset, boolean)</code></a> instead (and specify the appropriate encoding)</span></div>
  3045. <div class="block">Writes a CharSequence to a file creating the file if it does not exist using the default encoding for the VM.</div>
  3046. <dl>
  3047. <dt><span class="paramLabel">Parameters:</span></dt>
  3048. <dd><code>file</code> - the file to write</dd>
  3049. <dd><code>data</code> - the content to write to the file</dd>
  3050. <dd><code>append</code> - if <code>true</code>, then the data will be added to the
  3051. end of the file rather than overwriting</dd>
  3052. <dt><span class="throwsLabel">Throws:</span></dt>
  3053. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3054. <dt><span class="simpleTagLabel">Since:</span></dt>
  3055. <dd>2.1</dd>
  3056. </dl>
  3057. </li>
  3058. </ul>
  3059. <a name="write-java.io.File-java.lang.CharSequence-java.nio.charset.Charset-">
  3060. <!-- -->
  3061. </a>
  3062. <ul class="blockList">
  3063. <li class="blockList">
  3064. <h4>write</h4>
  3065. <pre>public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3066. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  3067. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding)
  3068. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3069. <div class="block">Writes a CharSequence to a file creating the file if it does not exist.</div>
  3070. <dl>
  3071. <dt><span class="paramLabel">Parameters:</span></dt>
  3072. <dd><code>file</code> - the file to write</dd>
  3073. <dd><code>data</code> - the content to write to the file</dd>
  3074. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  3075. <dt><span class="throwsLabel">Throws:</span></dt>
  3076. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3077. <dt><span class="simpleTagLabel">Since:</span></dt>
  3078. <dd>2.3</dd>
  3079. </dl>
  3080. </li>
  3081. </ul>
  3082. <a name="write-java.io.File-java.lang.CharSequence-java.lang.String-">
  3083. <!-- -->
  3084. </a>
  3085. <ul class="blockList">
  3086. <li class="blockList">
  3087. <h4>write</h4>
  3088. <pre>public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3089. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  3090. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding)
  3091. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3092. <div class="block">Writes a CharSequence to a file creating the file if it does not exist.</div>
  3093. <dl>
  3094. <dt><span class="paramLabel">Parameters:</span></dt>
  3095. <dd><code>file</code> - the file to write</dd>
  3096. <dd><code>data</code> - the content to write to the file</dd>
  3097. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  3098. <dt><span class="throwsLabel">Throws:</span></dt>
  3099. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3100. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - if the encoding is not supported by the VM</dd>
  3101. <dt><span class="simpleTagLabel">Since:</span></dt>
  3102. <dd>2.0</dd>
  3103. </dl>
  3104. </li>
  3105. </ul>
  3106. <a name="write-java.io.File-java.lang.CharSequence-java.nio.charset.Charset-boolean-">
  3107. <!-- -->
  3108. </a>
  3109. <ul class="blockList">
  3110. <li class="blockList">
  3111. <h4>write</h4>
  3112. <pre>public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3113. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  3114. <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;encoding,
  3115. boolean&nbsp;append)
  3116. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3117. <div class="block">Writes a CharSequence to a file creating the file if it does not exist.</div>
  3118. <dl>
  3119. <dt><span class="paramLabel">Parameters:</span></dt>
  3120. <dd><code>file</code> - the file to write</dd>
  3121. <dd><code>data</code> - the content to write to the file</dd>
  3122. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  3123. <dd><code>append</code> - if <code>true</code>, then the data will be added to the
  3124. end of the file rather than overwriting</dd>
  3125. <dt><span class="throwsLabel">Throws:</span></dt>
  3126. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3127. <dt><span class="simpleTagLabel">Since:</span></dt>
  3128. <dd>2.3</dd>
  3129. </dl>
  3130. </li>
  3131. </ul>
  3132. <a name="write-java.io.File-java.lang.CharSequence-java.lang.String-boolean-">
  3133. <!-- -->
  3134. </a>
  3135. <ul class="blockList">
  3136. <li class="blockList">
  3137. <h4>write</h4>
  3138. <pre>public static&nbsp;void&nbsp;write(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3139. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;data,
  3140. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding,
  3141. boolean&nbsp;append)
  3142. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3143. <div class="block">Writes a CharSequence to a file creating the file if it does not exist.</div>
  3144. <dl>
  3145. <dt><span class="paramLabel">Parameters:</span></dt>
  3146. <dd><code>file</code> - the file to write</dd>
  3147. <dd><code>data</code> - the content to write to the file</dd>
  3148. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  3149. <dd><code>append</code> - if <code>true</code>, then the data will be added to the
  3150. end of the file rather than overwriting</dd>
  3151. <dt><span class="throwsLabel">Throws:</span></dt>
  3152. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3153. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - thrown instead of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html?is-external=true"><code>.UnsupportedEncodingException</code></a> in version 2.2 if the encoding is not supported by the VM</dd>
  3154. <dt><span class="simpleTagLabel">Since:</span></dt>
  3155. <dd>2.1</dd>
  3156. </dl>
  3157. </li>
  3158. </ul>
  3159. <a name="writeByteArrayToFile-java.io.File-byte:A-">
  3160. <!-- -->
  3161. </a>
  3162. <ul class="blockList">
  3163. <li class="blockList">
  3164. <h4>writeByteArrayToFile</h4>
  3165. <pre>public static&nbsp;void&nbsp;writeByteArrayToFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3166. byte[]&nbsp;data)
  3167. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3168. <div class="block">Writes a byte array to a file creating the file if it does not exist.
  3169. <p>
  3170. NOTE: As from v1.3, the parent directories of the file will be created
  3171. if they do not exist.</div>
  3172. <dl>
  3173. <dt><span class="paramLabel">Parameters:</span></dt>
  3174. <dd><code>file</code> - the file to write to</dd>
  3175. <dd><code>data</code> - the content to write to the file</dd>
  3176. <dt><span class="throwsLabel">Throws:</span></dt>
  3177. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3178. <dt><span class="simpleTagLabel">Since:</span></dt>
  3179. <dd>1.1</dd>
  3180. </dl>
  3181. </li>
  3182. </ul>
  3183. <a name="writeByteArrayToFile-java.io.File-byte:A-boolean-">
  3184. <!-- -->
  3185. </a>
  3186. <ul class="blockList">
  3187. <li class="blockList">
  3188. <h4>writeByteArrayToFile</h4>
  3189. <pre>public static&nbsp;void&nbsp;writeByteArrayToFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3190. byte[]&nbsp;data,
  3191. boolean&nbsp;append)
  3192. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3193. <div class="block">Writes a byte array to a file creating the file if it does not exist.</div>
  3194. <dl>
  3195. <dt><span class="paramLabel">Parameters:</span></dt>
  3196. <dd><code>file</code> - the file to write to</dd>
  3197. <dd><code>data</code> - the content to write to the file</dd>
  3198. <dd><code>append</code> - if <code>true</code>, then bytes will be added to the
  3199. end of the file rather than overwriting</dd>
  3200. <dt><span class="throwsLabel">Throws:</span></dt>
  3201. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3202. <dt><span class="simpleTagLabel">Since:</span></dt>
  3203. <dd>2.1</dd>
  3204. </dl>
  3205. </li>
  3206. </ul>
  3207. <a name="writeByteArrayToFile-java.io.File-byte:A-int-int-">
  3208. <!-- -->
  3209. </a>
  3210. <ul class="blockList">
  3211. <li class="blockList">
  3212. <h4>writeByteArrayToFile</h4>
  3213. <pre>public static&nbsp;void&nbsp;writeByteArrayToFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3214. byte[]&nbsp;data,
  3215. int&nbsp;off,
  3216. int&nbsp;len)
  3217. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3218. <div class="block">Writes <code>len</code> bytes from the specified byte array starting
  3219. at offset <code>off</code> to a file, creating the file if it does
  3220. not exist.</div>
  3221. <dl>
  3222. <dt><span class="paramLabel">Parameters:</span></dt>
  3223. <dd><code>file</code> - the file to write to</dd>
  3224. <dd><code>data</code> - the content to write to the file</dd>
  3225. <dd><code>off</code> - the start offset in the data</dd>
  3226. <dd><code>len</code> - the number of bytes to write</dd>
  3227. <dt><span class="throwsLabel">Throws:</span></dt>
  3228. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3229. <dt><span class="simpleTagLabel">Since:</span></dt>
  3230. <dd>2.5</dd>
  3231. </dl>
  3232. </li>
  3233. </ul>
  3234. <a name="writeByteArrayToFile-java.io.File-byte:A-int-int-boolean-">
  3235. <!-- -->
  3236. </a>
  3237. <ul class="blockList">
  3238. <li class="blockList">
  3239. <h4>writeByteArrayToFile</h4>
  3240. <pre>public static&nbsp;void&nbsp;writeByteArrayToFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3241. byte[]&nbsp;data,
  3242. int&nbsp;off,
  3243. int&nbsp;len,
  3244. boolean&nbsp;append)
  3245. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3246. <div class="block">Writes <code>len</code> bytes from the specified byte array starting
  3247. at offset <code>off</code> to a file, creating the file if it does
  3248. not exist.</div>
  3249. <dl>
  3250. <dt><span class="paramLabel">Parameters:</span></dt>
  3251. <dd><code>file</code> - the file to write to</dd>
  3252. <dd><code>data</code> - the content to write to the file</dd>
  3253. <dd><code>off</code> - the start offset in the data</dd>
  3254. <dd><code>len</code> - the number of bytes to write</dd>
  3255. <dd><code>append</code> - if <code>true</code>, then bytes will be added to the
  3256. end of the file rather than overwriting</dd>
  3257. <dt><span class="throwsLabel">Throws:</span></dt>
  3258. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3259. <dt><span class="simpleTagLabel">Since:</span></dt>
  3260. <dd>2.5</dd>
  3261. </dl>
  3262. </li>
  3263. </ul>
  3264. <a name="writeLines-java.io.File-java.lang.String-java.util.Collection-">
  3265. <!-- -->
  3266. </a>
  3267. <ul class="blockList">
  3268. <li class="blockList">
  3269. <h4>writeLines</h4>
  3270. <pre>public static&nbsp;void&nbsp;writeLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3271. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding,
  3272. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines)
  3273. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3274. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  3275. the specified <code>File</code> line by line.
  3276. The specified character encoding and the default line ending will be used.
  3277. <p>
  3278. NOTE: As from v1.3, the parent directories of the file will be created
  3279. if they do not exist.</div>
  3280. <dl>
  3281. <dt><span class="paramLabel">Parameters:</span></dt>
  3282. <dd><code>file</code> - the file to write to</dd>
  3283. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  3284. <dd><code>lines</code> - the lines to write, <code>null</code> entries produce blank lines</dd>
  3285. <dt><span class="throwsLabel">Throws:</span></dt>
  3286. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3287. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - if the encoding is not supported by the VM</dd>
  3288. <dt><span class="simpleTagLabel">Since:</span></dt>
  3289. <dd>1.1</dd>
  3290. </dl>
  3291. </li>
  3292. </ul>
  3293. <a name="writeLines-java.io.File-java.lang.String-java.util.Collection-boolean-">
  3294. <!-- -->
  3295. </a>
  3296. <ul class="blockList">
  3297. <li class="blockList">
  3298. <h4>writeLines</h4>
  3299. <pre>public static&nbsp;void&nbsp;writeLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3300. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding,
  3301. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  3302. boolean&nbsp;append)
  3303. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3304. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  3305. the specified <code>File</code> line by line, optionally appending.
  3306. The specified character encoding and the default line ending will be used.</div>
  3307. <dl>
  3308. <dt><span class="paramLabel">Parameters:</span></dt>
  3309. <dd><code>file</code> - the file to write to</dd>
  3310. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  3311. <dd><code>lines</code> - the lines to write, <code>null</code> entries produce blank lines</dd>
  3312. <dd><code>append</code> - if <code>true</code>, then the lines will be added to the
  3313. end of the file rather than overwriting</dd>
  3314. <dt><span class="throwsLabel">Throws:</span></dt>
  3315. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3316. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - if the encoding is not supported by the VM</dd>
  3317. <dt><span class="simpleTagLabel">Since:</span></dt>
  3318. <dd>2.1</dd>
  3319. </dl>
  3320. </li>
  3321. </ul>
  3322. <a name="writeLines-java.io.File-java.util.Collection-">
  3323. <!-- -->
  3324. </a>
  3325. <ul class="blockList">
  3326. <li class="blockList">
  3327. <h4>writeLines</h4>
  3328. <pre>public static&nbsp;void&nbsp;writeLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3329. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines)
  3330. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3331. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  3332. the specified <code>File</code> line by line.
  3333. The default VM encoding and the default line ending will be used.</div>
  3334. <dl>
  3335. <dt><span class="paramLabel">Parameters:</span></dt>
  3336. <dd><code>file</code> - the file to write to</dd>
  3337. <dd><code>lines</code> - the lines to write, <code>null</code> entries produce blank lines</dd>
  3338. <dt><span class="throwsLabel">Throws:</span></dt>
  3339. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3340. <dt><span class="simpleTagLabel">Since:</span></dt>
  3341. <dd>1.3</dd>
  3342. </dl>
  3343. </li>
  3344. </ul>
  3345. <a name="writeLines-java.io.File-java.util.Collection-boolean-">
  3346. <!-- -->
  3347. </a>
  3348. <ul class="blockList">
  3349. <li class="blockList">
  3350. <h4>writeLines</h4>
  3351. <pre>public static&nbsp;void&nbsp;writeLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3352. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  3353. boolean&nbsp;append)
  3354. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3355. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  3356. the specified <code>File</code> line by line.
  3357. The default VM encoding and the default line ending will be used.</div>
  3358. <dl>
  3359. <dt><span class="paramLabel">Parameters:</span></dt>
  3360. <dd><code>file</code> - the file to write to</dd>
  3361. <dd><code>lines</code> - the lines to write, <code>null</code> entries produce blank lines</dd>
  3362. <dd><code>append</code> - if <code>true</code>, then the lines will be added to the
  3363. end of the file rather than overwriting</dd>
  3364. <dt><span class="throwsLabel">Throws:</span></dt>
  3365. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3366. <dt><span class="simpleTagLabel">Since:</span></dt>
  3367. <dd>2.1</dd>
  3368. </dl>
  3369. </li>
  3370. </ul>
  3371. <a name="writeLines-java.io.File-java.lang.String-java.util.Collection-java.lang.String-">
  3372. <!-- -->
  3373. </a>
  3374. <ul class="blockList">
  3375. <li class="blockList">
  3376. <h4>writeLines</h4>
  3377. <pre>public static&nbsp;void&nbsp;writeLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3378. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding,
  3379. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  3380. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding)
  3381. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3382. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  3383. the specified <code>File</code> line by line.
  3384. The specified character encoding and the line ending will be used.
  3385. <p>
  3386. NOTE: As from v1.3, the parent directories of the file will be created
  3387. if they do not exist.</div>
  3388. <dl>
  3389. <dt><span class="paramLabel">Parameters:</span></dt>
  3390. <dd><code>file</code> - the file to write to</dd>
  3391. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  3392. <dd><code>lines</code> - the lines to write, <code>null</code> entries produce blank lines</dd>
  3393. <dd><code>lineEnding</code> - the line separator to use, <code>null</code> is system default</dd>
  3394. <dt><span class="throwsLabel">Throws:</span></dt>
  3395. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3396. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - if the encoding is not supported by the VM</dd>
  3397. <dt><span class="simpleTagLabel">Since:</span></dt>
  3398. <dd>1.1</dd>
  3399. </dl>
  3400. </li>
  3401. </ul>
  3402. <a name="writeLines-java.io.File-java.lang.String-java.util.Collection-java.lang.String-boolean-">
  3403. <!-- -->
  3404. </a>
  3405. <ul class="blockList">
  3406. <li class="blockList">
  3407. <h4>writeLines</h4>
  3408. <pre>public static&nbsp;void&nbsp;writeLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3409. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encoding,
  3410. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  3411. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
  3412. boolean&nbsp;append)
  3413. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3414. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  3415. the specified <code>File</code> line by line.
  3416. The specified character encoding and the line ending will be used.</div>
  3417. <dl>
  3418. <dt><span class="paramLabel">Parameters:</span></dt>
  3419. <dd><code>file</code> - the file to write to</dd>
  3420. <dd><code>encoding</code> - the encoding to use, <code>null</code> means platform default</dd>
  3421. <dd><code>lines</code> - the lines to write, <code>null</code> entries produce blank lines</dd>
  3422. <dd><code>lineEnding</code> - the line separator to use, <code>null</code> is system default</dd>
  3423. <dd><code>append</code> - if <code>true</code>, then the lines will be added to the
  3424. end of the file rather than overwriting</dd>
  3425. <dt><span class="throwsLabel">Throws:</span></dt>
  3426. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3427. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - if the encoding is not supported by the VM</dd>
  3428. <dt><span class="simpleTagLabel">Since:</span></dt>
  3429. <dd>2.1</dd>
  3430. </dl>
  3431. </li>
  3432. </ul>
  3433. <a name="writeLines-java.io.File-java.util.Collection-java.lang.String-">
  3434. <!-- -->
  3435. </a>
  3436. <ul class="blockList">
  3437. <li class="blockList">
  3438. <h4>writeLines</h4>
  3439. <pre>public static&nbsp;void&nbsp;writeLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3440. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  3441. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding)
  3442. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3443. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  3444. the specified <code>File</code> line by line.
  3445. The default VM encoding and the specified line ending will be used.</div>
  3446. <dl>
  3447. <dt><span class="paramLabel">Parameters:</span></dt>
  3448. <dd><code>file</code> - the file to write to</dd>
  3449. <dd><code>lines</code> - the lines to write, <code>null</code> entries produce blank lines</dd>
  3450. <dd><code>lineEnding</code> - the line separator to use, <code>null</code> is system default</dd>
  3451. <dt><span class="throwsLabel">Throws:</span></dt>
  3452. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3453. <dt><span class="simpleTagLabel">Since:</span></dt>
  3454. <dd>1.3</dd>
  3455. </dl>
  3456. </li>
  3457. </ul>
  3458. <a name="writeLines-java.io.File-java.util.Collection-java.lang.String-boolean-">
  3459. <!-- -->
  3460. </a>
  3461. <ul class="blockList">
  3462. <li class="blockList">
  3463. <h4>writeLines</h4>
  3464. <pre>public static&nbsp;void&nbsp;writeLines(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3465. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;lines,
  3466. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;lineEnding,
  3467. boolean&nbsp;append)
  3468. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3469. <div class="block">Writes the <code>toString()</code> value of each item in a collection to
  3470. the specified <code>File</code> line by line.
  3471. The default VM encoding and the specified line ending will be used.</div>
  3472. <dl>
  3473. <dt><span class="paramLabel">Parameters:</span></dt>
  3474. <dd><code>file</code> - the file to write to</dd>
  3475. <dd><code>lines</code> - the lines to write, <code>null</code> entries produce blank lines</dd>
  3476. <dd><code>lineEnding</code> - the line separator to use, <code>null</code> is system default</dd>
  3477. <dd><code>append</code> - if <code>true</code>, then the lines will be added to the
  3478. end of the file rather than overwriting</dd>
  3479. <dt><span class="throwsLabel">Throws:</span></dt>
  3480. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of an I/O error</dd>
  3481. <dt><span class="simpleTagLabel">Since:</span></dt>
  3482. <dd>2.1</dd>
  3483. </dl>
  3484. </li>
  3485. </ul>
  3486. <a name="forceDelete-java.io.File-">
  3487. <!-- -->
  3488. </a>
  3489. <ul class="blockList">
  3490. <li class="blockList">
  3491. <h4>forceDelete</h4>
  3492. <pre>public static&nbsp;void&nbsp;forceDelete(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
  3493. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3494. <div class="block">Deletes a file. If file is a directory, delete it and all sub-directories.
  3495. <p>
  3496. The difference between File.delete() and this method are:
  3497. <ul>
  3498. <li>A directory to be deleted does not have to be empty.</li>
  3499. <li>You get exceptions when a file or directory cannot be deleted.
  3500. (java.io.File methods returns a boolean)</li>
  3501. </ul></div>
  3502. <dl>
  3503. <dt><span class="paramLabel">Parameters:</span></dt>
  3504. <dd><code>file</code> - file or directory to delete, must not be <code>null</code></dd>
  3505. <dt><span class="throwsLabel">Throws:</span></dt>
  3506. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the directory is <code>null</code></dd>
  3507. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a></code> - if the file was not found</dd>
  3508. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case deletion is unsuccessful</dd>
  3509. </dl>
  3510. </li>
  3511. </ul>
  3512. <a name="forceDeleteOnExit-java.io.File-">
  3513. <!-- -->
  3514. </a>
  3515. <ul class="blockList">
  3516. <li class="blockList">
  3517. <h4>forceDeleteOnExit</h4>
  3518. <pre>public static&nbsp;void&nbsp;forceDeleteOnExit(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
  3519. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3520. <div class="block">Schedules a file to be deleted when JVM exits.
  3521. If file is directory delete it and all sub-directories.</div>
  3522. <dl>
  3523. <dt><span class="paramLabel">Parameters:</span></dt>
  3524. <dd><code>file</code> - file or directory to delete, must not be <code>null</code></dd>
  3525. <dt><span class="throwsLabel">Throws:</span></dt>
  3526. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the file is <code>null</code></dd>
  3527. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case deletion is unsuccessful</dd>
  3528. </dl>
  3529. </li>
  3530. </ul>
  3531. <a name="forceMkdir-java.io.File-">
  3532. <!-- -->
  3533. </a>
  3534. <ul class="blockList">
  3535. <li class="blockList">
  3536. <h4>forceMkdir</h4>
  3537. <pre>public static&nbsp;void&nbsp;forceMkdir(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory)
  3538. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3539. <div class="block">Makes a directory, including any necessary but nonexistent parent
  3540. directories. If a file already exists with specified name but it is
  3541. not a directory then an IOException is thrown.
  3542. If the directory cannot be created (or does not already exist)
  3543. then an IOException is thrown.</div>
  3544. <dl>
  3545. <dt><span class="paramLabel">Parameters:</span></dt>
  3546. <dd><code>directory</code> - directory to create, must not be <code>null</code></dd>
  3547. <dt><span class="throwsLabel">Throws:</span></dt>
  3548. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the directory is <code>null</code></dd>
  3549. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the directory cannot be created or the file already exists but is not a directory</dd>
  3550. </dl>
  3551. </li>
  3552. </ul>
  3553. <a name="forceMkdirParent-java.io.File-">
  3554. <!-- -->
  3555. </a>
  3556. <ul class="blockList">
  3557. <li class="blockList">
  3558. <h4>forceMkdirParent</h4>
  3559. <pre>public static&nbsp;void&nbsp;forceMkdirParent(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
  3560. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3561. <div class="block">Makes any necessary but nonexistent parent directories for a given File. If the parent directory cannot be
  3562. created then an IOException is thrown.</div>
  3563. <dl>
  3564. <dt><span class="paramLabel">Parameters:</span></dt>
  3565. <dd><code>file</code> - file with parent to create, must not be <code>null</code></dd>
  3566. <dt><span class="throwsLabel">Throws:</span></dt>
  3567. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the file is <code>null</code></dd>
  3568. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the parent directory cannot be created</dd>
  3569. <dt><span class="simpleTagLabel">Since:</span></dt>
  3570. <dd>2.5</dd>
  3571. </dl>
  3572. </li>
  3573. </ul>
  3574. <a name="sizeOf-java.io.File-">
  3575. <!-- -->
  3576. </a>
  3577. <ul class="blockList">
  3578. <li class="blockList">
  3579. <h4>sizeOf</h4>
  3580. <pre>public static&nbsp;long&nbsp;sizeOf(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</pre>
  3581. <div class="block">Returns the size of the specified file or directory. If the provided
  3582. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io"><code>File</code></a> is a regular file, then the file's length is returned.
  3583. If the argument is a directory, then the size of the directory is
  3584. calculated recursively. If a directory or subdirectory is security
  3585. restricted, its size will not be included.
  3586. <p>
  3587. Note that overflow is not detected, and the return value may be negative if
  3588. overflow occurs. See <a href="../../../../org/apache/commons/io/FileUtils.html#sizeOfAsBigInteger-java.io.File-"><code>sizeOfAsBigInteger(File)</code></a> for an alternative
  3589. method that does not overflow.</div>
  3590. <dl>
  3591. <dt><span class="paramLabel">Parameters:</span></dt>
  3592. <dd><code>file</code> - the regular file or directory to return the size
  3593. of (must not be <code>null</code>).</dd>
  3594. <dt><span class="returnLabel">Returns:</span></dt>
  3595. <dd>the length of the file, or recursive size of the directory,
  3596. provided (in bytes).</dd>
  3597. <dt><span class="throwsLabel">Throws:</span></dt>
  3598. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the file is <code>null</code></dd>
  3599. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the file does not exist.</dd>
  3600. <dt><span class="simpleTagLabel">Since:</span></dt>
  3601. <dd>2.0</dd>
  3602. </dl>
  3603. </li>
  3604. </ul>
  3605. <a name="sizeOfAsBigInteger-java.io.File-">
  3606. <!-- -->
  3607. </a>
  3608. <ul class="blockList">
  3609. <li class="blockList">
  3610. <h4>sizeOfAsBigInteger</h4>
  3611. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a>&nbsp;sizeOfAsBigInteger(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</pre>
  3612. <div class="block">Returns the size of the specified file or directory. If the provided
  3613. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io"><code>File</code></a> is a regular file, then the file's length is returned.
  3614. If the argument is a directory, then the size of the directory is
  3615. calculated recursively. If a directory or subdirectory is security
  3616. restricted, its size will not be included.</div>
  3617. <dl>
  3618. <dt><span class="paramLabel">Parameters:</span></dt>
  3619. <dd><code>file</code> - the regular file or directory to return the size
  3620. of (must not be <code>null</code>).</dd>
  3621. <dt><span class="returnLabel">Returns:</span></dt>
  3622. <dd>the length of the file, or recursive size of the directory,
  3623. provided (in bytes).</dd>
  3624. <dt><span class="throwsLabel">Throws:</span></dt>
  3625. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the file is <code>null</code></dd>
  3626. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the file does not exist.</dd>
  3627. <dt><span class="simpleTagLabel">Since:</span></dt>
  3628. <dd>2.4</dd>
  3629. </dl>
  3630. </li>
  3631. </ul>
  3632. <a name="sizeOfDirectory-java.io.File-">
  3633. <!-- -->
  3634. </a>
  3635. <ul class="blockList">
  3636. <li class="blockList">
  3637. <h4>sizeOfDirectory</h4>
  3638. <pre>public static&nbsp;long&nbsp;sizeOfDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory)</pre>
  3639. <div class="block">Counts the size of a directory recursively (sum of the length of all files).
  3640. <p>
  3641. Note that overflow is not detected, and the return value may be negative if
  3642. overflow occurs. See <a href="../../../../org/apache/commons/io/FileUtils.html#sizeOfDirectoryAsBigInteger-java.io.File-"><code>sizeOfDirectoryAsBigInteger(File)</code></a> for an alternative
  3643. method that does not overflow.</div>
  3644. <dl>
  3645. <dt><span class="paramLabel">Parameters:</span></dt>
  3646. <dd><code>directory</code> - directory to inspect, must not be <code>null</code></dd>
  3647. <dt><span class="returnLabel">Returns:</span></dt>
  3648. <dd>size of directory in bytes, 0 if directory is security restricted, a negative number when the real total
  3649. is greater than <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html?is-external=true#MAX_VALUE" title="class or interface in java.lang"><code>Long.MAX_VALUE</code></a>.</dd>
  3650. <dt><span class="throwsLabel">Throws:</span></dt>
  3651. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the directory is <code>null</code></dd>
  3652. </dl>
  3653. </li>
  3654. </ul>
  3655. <a name="sizeOfDirectoryAsBigInteger-java.io.File-">
  3656. <!-- -->
  3657. </a>
  3658. <ul class="blockList">
  3659. <li class="blockList">
  3660. <h4>sizeOfDirectoryAsBigInteger</h4>
  3661. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a>&nbsp;sizeOfDirectoryAsBigInteger(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;directory)</pre>
  3662. <div class="block">Counts the size of a directory recursively (sum of the length of all files).</div>
  3663. <dl>
  3664. <dt><span class="paramLabel">Parameters:</span></dt>
  3665. <dd><code>directory</code> - directory to inspect, must not be <code>null</code></dd>
  3666. <dt><span class="returnLabel">Returns:</span></dt>
  3667. <dd>size of directory in bytes, 0 if directory is security restricted.</dd>
  3668. <dt><span class="throwsLabel">Throws:</span></dt>
  3669. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the directory is <code>null</code></dd>
  3670. <dt><span class="simpleTagLabel">Since:</span></dt>
  3671. <dd>2.4</dd>
  3672. </dl>
  3673. </li>
  3674. </ul>
  3675. <a name="isFileNewer-java.io.File-java.io.File-">
  3676. <!-- -->
  3677. </a>
  3678. <ul class="blockList">
  3679. <li class="blockList">
  3680. <h4>isFileNewer</h4>
  3681. <pre>public static&nbsp;boolean&nbsp;isFileNewer(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3682. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;reference)</pre>
  3683. <div class="block">Tests if the specified <code>File</code> is newer than the reference
  3684. <code>File</code>.</div>
  3685. <dl>
  3686. <dt><span class="paramLabel">Parameters:</span></dt>
  3687. <dd><code>file</code> - the <code>File</code> of which the modification date must
  3688. be compared, must not be <code>null</code></dd>
  3689. <dd><code>reference</code> - the <code>File</code> of which the modification date
  3690. is used, must not be <code>null</code></dd>
  3691. <dt><span class="returnLabel">Returns:</span></dt>
  3692. <dd>true if the <code>File</code> exists and has been modified more
  3693. recently than the reference <code>File</code></dd>
  3694. <dt><span class="throwsLabel">Throws:</span></dt>
  3695. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the file is <code>null</code></dd>
  3696. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the reference file is <code>null</code> or doesn't exist</dd>
  3697. </dl>
  3698. </li>
  3699. </ul>
  3700. <a name="isFileNewer-java.io.File-java.util.Date-">
  3701. <!-- -->
  3702. </a>
  3703. <ul class="blockList">
  3704. <li class="blockList">
  3705. <h4>isFileNewer</h4>
  3706. <pre>public static&nbsp;boolean&nbsp;isFileNewer(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3707. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date)</pre>
  3708. <div class="block">Tests if the specified <code>File</code> is newer than the specified
  3709. <code>Date</code>.</div>
  3710. <dl>
  3711. <dt><span class="paramLabel">Parameters:</span></dt>
  3712. <dd><code>file</code> - the <code>File</code> of which the modification date
  3713. must be compared, must not be <code>null</code></dd>
  3714. <dd><code>date</code> - the date reference, must not be <code>null</code></dd>
  3715. <dt><span class="returnLabel">Returns:</span></dt>
  3716. <dd>true if the <code>File</code> exists and has been modified
  3717. after the given <code>Date</code>.</dd>
  3718. <dt><span class="throwsLabel">Throws:</span></dt>
  3719. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the file is <code>null</code></dd>
  3720. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code></dd>
  3721. </dl>
  3722. </li>
  3723. </ul>
  3724. <a name="isFileNewer-java.io.File-long-">
  3725. <!-- -->
  3726. </a>
  3727. <ul class="blockList">
  3728. <li class="blockList">
  3729. <h4>isFileNewer</h4>
  3730. <pre>public static&nbsp;boolean&nbsp;isFileNewer(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3731. long&nbsp;timeMillis)</pre>
  3732. <div class="block">Tests if the specified <code>File</code> is newer than the specified
  3733. time reference.</div>
  3734. <dl>
  3735. <dt><span class="paramLabel">Parameters:</span></dt>
  3736. <dd><code>file</code> - the <code>File</code> of which the modification date must
  3737. be compared, must not be <code>null</code></dd>
  3738. <dd><code>timeMillis</code> - the time reference measured in milliseconds since the
  3739. epoch (00:00:00 GMT, January 1, 1970)</dd>
  3740. <dt><span class="returnLabel">Returns:</span></dt>
  3741. <dd>true if the <code>File</code> exists and has been modified after
  3742. the given time reference.</dd>
  3743. <dt><span class="throwsLabel">Throws:</span></dt>
  3744. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the file is <code>null</code></dd>
  3745. </dl>
  3746. </li>
  3747. </ul>
  3748. <a name="isFileOlder-java.io.File-java.io.File-">
  3749. <!-- -->
  3750. </a>
  3751. <ul class="blockList">
  3752. <li class="blockList">
  3753. <h4>isFileOlder</h4>
  3754. <pre>public static&nbsp;boolean&nbsp;isFileOlder(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3755. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;reference)</pre>
  3756. <div class="block">Tests if the specified <code>File</code> is older than the reference
  3757. <code>File</code>.</div>
  3758. <dl>
  3759. <dt><span class="paramLabel">Parameters:</span></dt>
  3760. <dd><code>file</code> - the <code>File</code> of which the modification date must
  3761. be compared, must not be <code>null</code></dd>
  3762. <dd><code>reference</code> - the <code>File</code> of which the modification date
  3763. is used, must not be <code>null</code></dd>
  3764. <dt><span class="returnLabel">Returns:</span></dt>
  3765. <dd>true if the <code>File</code> exists and has been modified before
  3766. the reference <code>File</code></dd>
  3767. <dt><span class="throwsLabel">Throws:</span></dt>
  3768. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the file is <code>null</code></dd>
  3769. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the reference file is <code>null</code> or doesn't exist</dd>
  3770. </dl>
  3771. </li>
  3772. </ul>
  3773. <a name="isFileOlder-java.io.File-java.util.Date-">
  3774. <!-- -->
  3775. </a>
  3776. <ul class="blockList">
  3777. <li class="blockList">
  3778. <h4>isFileOlder</h4>
  3779. <pre>public static&nbsp;boolean&nbsp;isFileOlder(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3780. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date)</pre>
  3781. <div class="block">Tests if the specified <code>File</code> is older than the specified
  3782. <code>Date</code>.</div>
  3783. <dl>
  3784. <dt><span class="paramLabel">Parameters:</span></dt>
  3785. <dd><code>file</code> - the <code>File</code> of which the modification date
  3786. must be compared, must not be <code>null</code></dd>
  3787. <dd><code>date</code> - the date reference, must not be <code>null</code></dd>
  3788. <dt><span class="returnLabel">Returns:</span></dt>
  3789. <dd>true if the <code>File</code> exists and has been modified
  3790. before the given <code>Date</code>.</dd>
  3791. <dt><span class="throwsLabel">Throws:</span></dt>
  3792. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the file is <code>null</code></dd>
  3793. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code></dd>
  3794. </dl>
  3795. </li>
  3796. </ul>
  3797. <a name="isFileOlder-java.io.File-long-">
  3798. <!-- -->
  3799. </a>
  3800. <ul class="blockList">
  3801. <li class="blockList">
  3802. <h4>isFileOlder</h4>
  3803. <pre>public static&nbsp;boolean&nbsp;isFileOlder(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3804. long&nbsp;timeMillis)</pre>
  3805. <div class="block">Tests if the specified <code>File</code> is older than the specified
  3806. time reference.</div>
  3807. <dl>
  3808. <dt><span class="paramLabel">Parameters:</span></dt>
  3809. <dd><code>file</code> - the <code>File</code> of which the modification date must
  3810. be compared, must not be <code>null</code></dd>
  3811. <dd><code>timeMillis</code> - the time reference measured in milliseconds since the
  3812. epoch (00:00:00 GMT, January 1, 1970)</dd>
  3813. <dt><span class="returnLabel">Returns:</span></dt>
  3814. <dd>true if the <code>File</code> exists and has been modified before
  3815. the given time reference.</dd>
  3816. <dt><span class="throwsLabel">Throws:</span></dt>
  3817. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the file is <code>null</code></dd>
  3818. </dl>
  3819. </li>
  3820. </ul>
  3821. <a name="checksumCRC32-java.io.File-">
  3822. <!-- -->
  3823. </a>
  3824. <ul class="blockList">
  3825. <li class="blockList">
  3826. <h4>checksumCRC32</h4>
  3827. <pre>public static&nbsp;long&nbsp;checksumCRC32(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
  3828. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3829. <div class="block">Computes the checksum of a file using the CRC32 checksum routine.
  3830. The value of the checksum is returned.</div>
  3831. <dl>
  3832. <dt><span class="paramLabel">Parameters:</span></dt>
  3833. <dd><code>file</code> - the file to checksum, must not be <code>null</code></dd>
  3834. <dt><span class="returnLabel">Returns:</span></dt>
  3835. <dd>the checksum value</dd>
  3836. <dt><span class="throwsLabel">Throws:</span></dt>
  3837. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the file or checksum is <code>null</code></dd>
  3838. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the file is a directory</dd>
  3839. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs reading the file</dd>
  3840. <dt><span class="simpleTagLabel">Since:</span></dt>
  3841. <dd>1.3</dd>
  3842. </dl>
  3843. </li>
  3844. </ul>
  3845. <a name="checksum-java.io.File-java.util.zip.Checksum-">
  3846. <!-- -->
  3847. </a>
  3848. <ul class="blockList">
  3849. <li class="blockList">
  3850. <h4>checksum</h4>
  3851. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a>&nbsp;checksum(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
  3852. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a>&nbsp;checksum)
  3853. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3854. <div class="block">Computes the checksum of a file using the specified checksum object.
  3855. Multiple files may be checked using one <code>Checksum</code> instance
  3856. if desired simply by reusing the same checksum object.
  3857. For example:
  3858. <pre>
  3859. long csum = FileUtils.checksum(file, new CRC32()).getValue();
  3860. </pre></div>
  3861. <dl>
  3862. <dt><span class="paramLabel">Parameters:</span></dt>
  3863. <dd><code>file</code> - the file to checksum, must not be <code>null</code></dd>
  3864. <dd><code>checksum</code> - the checksum object to be used, must not be <code>null</code></dd>
  3865. <dt><span class="returnLabel">Returns:</span></dt>
  3866. <dd>the checksum specified, updated with the content of the file</dd>
  3867. <dt><span class="throwsLabel">Throws:</span></dt>
  3868. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the file or checksum is <code>null</code></dd>
  3869. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the file is a directory</dd>
  3870. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs reading the file</dd>
  3871. <dt><span class="simpleTagLabel">Since:</span></dt>
  3872. <dd>1.3</dd>
  3873. </dl>
  3874. </li>
  3875. </ul>
  3876. <a name="moveDirectory-java.io.File-java.io.File-">
  3877. <!-- -->
  3878. </a>
  3879. <ul class="blockList">
  3880. <li class="blockList">
  3881. <h4>moveDirectory</h4>
  3882. <pre>public static&nbsp;void&nbsp;moveDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcDir,
  3883. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir)
  3884. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3885. <div class="block">Moves a directory.
  3886. <p>
  3887. When the destination directory is on another file system, do a "copy and delete".</div>
  3888. <dl>
  3889. <dt><span class="paramLabel">Parameters:</span></dt>
  3890. <dd><code>srcDir</code> - the directory to be moved</dd>
  3891. <dd><code>destDir</code> - the destination directory</dd>
  3892. <dt><span class="throwsLabel">Throws:</span></dt>
  3893. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is <code>null</code></dd>
  3894. <dd><code><a href="../../../../org/apache/commons/io/FileExistsException.html" title="class in org.apache.commons.io">FileExistsException</a></code> - if the destination directory exists</dd>
  3895. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  3896. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs moving the file</dd>
  3897. <dt><span class="simpleTagLabel">Since:</span></dt>
  3898. <dd>1.4</dd>
  3899. </dl>
  3900. </li>
  3901. </ul>
  3902. <a name="moveDirectoryToDirectory-java.io.File-java.io.File-boolean-">
  3903. <!-- -->
  3904. </a>
  3905. <ul class="blockList">
  3906. <li class="blockList">
  3907. <h4>moveDirectoryToDirectory</h4>
  3908. <pre>public static&nbsp;void&nbsp;moveDirectoryToDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;src,
  3909. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir,
  3910. boolean&nbsp;createDestDir)
  3911. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3912. <div class="block">Moves a directory to another directory.</div>
  3913. <dl>
  3914. <dt><span class="paramLabel">Parameters:</span></dt>
  3915. <dd><code>src</code> - the file to be moved</dd>
  3916. <dd><code>destDir</code> - the destination file</dd>
  3917. <dd><code>createDestDir</code> - If <code>true</code> create the destination directory,
  3918. otherwise if <code>false</code> throw an IOException</dd>
  3919. <dt><span class="throwsLabel">Throws:</span></dt>
  3920. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is <code>null</code></dd>
  3921. <dd><code><a href="../../../../org/apache/commons/io/FileExistsException.html" title="class in org.apache.commons.io">FileExistsException</a></code> - if the directory exists in the destination directory</dd>
  3922. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  3923. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs moving the file</dd>
  3924. <dt><span class="simpleTagLabel">Since:</span></dt>
  3925. <dd>1.4</dd>
  3926. </dl>
  3927. </li>
  3928. </ul>
  3929. <a name="moveFile-java.io.File-java.io.File-">
  3930. <!-- -->
  3931. </a>
  3932. <ul class="blockList">
  3933. <li class="blockList">
  3934. <h4>moveFile</h4>
  3935. <pre>public static&nbsp;void&nbsp;moveFile(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcFile,
  3936. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destFile)
  3937. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3938. <div class="block">Moves a file.
  3939. <p>
  3940. When the destination file is on another file system, do a "copy and delete".</div>
  3941. <dl>
  3942. <dt><span class="paramLabel">Parameters:</span></dt>
  3943. <dd><code>srcFile</code> - the file to be moved</dd>
  3944. <dd><code>destFile</code> - the destination file</dd>
  3945. <dt><span class="throwsLabel">Throws:</span></dt>
  3946. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is <code>null</code></dd>
  3947. <dd><code><a href="../../../../org/apache/commons/io/FileExistsException.html" title="class in org.apache.commons.io">FileExistsException</a></code> - if the destination file exists</dd>
  3948. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  3949. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs moving the file</dd>
  3950. <dt><span class="simpleTagLabel">Since:</span></dt>
  3951. <dd>1.4</dd>
  3952. </dl>
  3953. </li>
  3954. </ul>
  3955. <a name="moveFileToDirectory-java.io.File-java.io.File-boolean-">
  3956. <!-- -->
  3957. </a>
  3958. <ul class="blockList">
  3959. <li class="blockList">
  3960. <h4>moveFileToDirectory</h4>
  3961. <pre>public static&nbsp;void&nbsp;moveFileToDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;srcFile,
  3962. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir,
  3963. boolean&nbsp;createDestDir)
  3964. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3965. <div class="block">Moves a file to a directory.</div>
  3966. <dl>
  3967. <dt><span class="paramLabel">Parameters:</span></dt>
  3968. <dd><code>srcFile</code> - the file to be moved</dd>
  3969. <dd><code>destDir</code> - the destination file</dd>
  3970. <dd><code>createDestDir</code> - If <code>true</code> create the destination directory,
  3971. otherwise if <code>false</code> throw an IOException</dd>
  3972. <dt><span class="throwsLabel">Throws:</span></dt>
  3973. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is <code>null</code></dd>
  3974. <dd><code><a href="../../../../org/apache/commons/io/FileExistsException.html" title="class in org.apache.commons.io">FileExistsException</a></code> - if the destination file exists</dd>
  3975. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  3976. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs moving the file</dd>
  3977. <dt><span class="simpleTagLabel">Since:</span></dt>
  3978. <dd>1.4</dd>
  3979. </dl>
  3980. </li>
  3981. </ul>
  3982. <a name="moveToDirectory-java.io.File-java.io.File-boolean-">
  3983. <!-- -->
  3984. </a>
  3985. <ul class="blockList">
  3986. <li class="blockList">
  3987. <h4>moveToDirectory</h4>
  3988. <pre>public static&nbsp;void&nbsp;moveToDirectory(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;src,
  3989. <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destDir,
  3990. boolean&nbsp;createDestDir)
  3991. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  3992. <div class="block">Moves a file or directory to the destination directory.
  3993. <p>
  3994. When the destination is on another file system, do a "copy and delete".</div>
  3995. <dl>
  3996. <dt><span class="paramLabel">Parameters:</span></dt>
  3997. <dd><code>src</code> - the file or directory to be moved</dd>
  3998. <dd><code>destDir</code> - the destination directory</dd>
  3999. <dd><code>createDestDir</code> - If <code>true</code> create the destination directory,
  4000. otherwise if <code>false</code> throw an IOException</dd>
  4001. <dt><span class="throwsLabel">Throws:</span></dt>
  4002. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if source or destination is <code>null</code></dd>
  4003. <dd><code><a href="../../../../org/apache/commons/io/FileExistsException.html" title="class in org.apache.commons.io">FileExistsException</a></code> - if the directory or file exists in the destination directory</dd>
  4004. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if source or destination is invalid</dd>
  4005. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs moving the file</dd>
  4006. <dt><span class="simpleTagLabel">Since:</span></dt>
  4007. <dd>1.4</dd>
  4008. </dl>
  4009. </li>
  4010. </ul>
  4011. <a name="isSymlink-java.io.File-">
  4012. <!-- -->
  4013. </a>
  4014. <ul class="blockListLast">
  4015. <li class="blockList">
  4016. <h4>isSymlink</h4>
  4017. <pre>public static&nbsp;boolean&nbsp;isSymlink(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
  4018. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  4019. <div class="block">Determines whether the specified file is a Symbolic Link rather than an actual file.
  4020. <p>
  4021. Will not return true if there is a Symbolic Link anywhere in the path,
  4022. only if the specific file is.
  4023. <p>
  4024. When using jdk1.7, this method delegates to <code>boolean java.nio.file.Files.isSymbolicLink(Path path)</code>
  4025. <b>Note:</b> the current implementation always returns <code>false</code> if running on
  4026. jkd1.6 and the system is detected as Windows using <a href="../../../../org/apache/commons/io/FilenameUtils.html#isSystemWindows--"><code>FilenameUtils.isSystemWindows()</code></a>
  4027. <p>
  4028. For code that runs on Java 1.7 or later, use the following method instead:
  4029. <br>
  4030. <code>boolean java.nio.file.Files.isSymbolicLink(Path path)</code></div>
  4031. <dl>
  4032. <dt><span class="paramLabel">Parameters:</span></dt>
  4033. <dd><code>file</code> - the file to check</dd>
  4034. <dt><span class="returnLabel">Returns:</span></dt>
  4035. <dd>true if the file is a Symbolic Link</dd>
  4036. <dt><span class="throwsLabel">Throws:</span></dt>
  4037. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an IO error occurs while checking the file</dd>
  4038. <dt><span class="simpleTagLabel">Since:</span></dt>
  4039. <dd>2.0</dd>
  4040. </dl>
  4041. </li>
  4042. </ul>
  4043. </li>
  4044. </ul>
  4045. </li>
  4046. </ul>
  4047. </div>
  4048. </div>
  4049. <!-- ========= END OF CLASS DATA ========= -->
  4050. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  4051. <div class="bottomNav"><a name="navbar.bottom">
  4052. <!-- -->
  4053. </a>
  4054. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  4055. <a name="navbar.bottom.firstrow">
  4056. <!-- -->
  4057. </a>
  4058. <ul class="navList" title="Navigation">
  4059. <li><a href="../../../../overview-summary.html">Overview</a></li>
  4060. <li><a href="package-summary.html">Package</a></li>
  4061. <li class="navBarCell1Rev">Class</li>
  4062. <li><a href="class-use/FileUtils.html">Use</a></li>
  4063. <li><a href="package-tree.html">Tree</a></li>
  4064. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  4065. <li><a href="../../../../index-all.html">Index</a></li>
  4066. <li><a href="../../../../help-doc.html">Help</a></li>
  4067. </ul>
  4068. </div>
  4069. <div class="subNav">
  4070. <ul class="navList">
  4071. <li><a href="../../../../org/apache/commons/io/FileSystemUtils.html" title="class in org.apache.commons.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  4072. <li><a href="../../../../org/apache/commons/io/HexDump.html" title="class in org.apache.commons.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  4073. </ul>
  4074. <ul class="navList">
  4075. <li><a href="../../../../index.html?org/apache/commons/io/FileUtils.html" target="_top">Frames</a></li>
  4076. <li><a href="FileUtils.html" target="_top">No&nbsp;Frames</a></li>
  4077. </ul>
  4078. <ul class="navList" id="allclasses_navbar_bottom">
  4079. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  4080. </ul>
  4081. <div>
  4082. <script type="text/javascript"><!--
  4083. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  4084. if(window==top) {
  4085. allClassesLink.style.display = "block";
  4086. }
  4087. else {
  4088. allClassesLink.style.display = "none";
  4089. }
  4090. //-->
  4091. </script>
  4092. </div>
  4093. <div>
  4094. <ul class="subNavList">
  4095. <li>Summary:&nbsp;</li>
  4096. <li>Nested&nbsp;|&nbsp;</li>
  4097. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  4098. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  4099. <li><a href="#method.summary">Method</a></li>
  4100. </ul>
  4101. <ul class="subNavList">
  4102. <li>Detail:&nbsp;</li>
  4103. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  4104. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  4105. <li><a href="#method.detail">Method</a></li>
  4106. </ul>
  4107. </div>
  4108. <a name="skip.navbar.bottom">
  4109. <!-- -->
  4110. </a></div>
  4111. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  4112. <p class="legalCopy"><small>Copyright &#169; 2002&#x2013;2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
  4113. </body>
  4114. </html>