mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-08 12:51:51 +09:00
1407 lines
68 KiB
HTML
1407 lines
68 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (1.8.0_101) on Sat Jun 10 08:04:06 CEST 2017 -->
|
|
<title>FileHandle (libgdx API)</title>
|
|
<meta name="date" content="2017-06-10">
|
|
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
|
<script type="text/javascript" src="../../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="FileHandle (libgdx API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":9,"i37":9,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10};
|
|
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/FileHandle.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage">
|
|
libgdx API
|
|
<style>
|
|
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
|
|
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
|
|
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
|
|
.TableHeadingColor { background:#EEEEFF; }
|
|
a { text-decoration:none }
|
|
a:hover { text-decoration:underline }
|
|
a:link, a:visited { color:blue }
|
|
table { border:0px }
|
|
.TableRowColor td:first-child { border-left:1px solid black }
|
|
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
|
|
hr { border:0px; border-bottom:1px solid #333366; }
|
|
</style>
|
|
</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li>Prev Class</li>
|
|
<li><a href="../../../../com/badlogic/gdx/files/FileHandleStream.html" title="class in com.badlogic.gdx.files"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/badlogic/gdx/files/FileHandle.html" target="_top">Frames</a></li>
|
|
<li><a href="FileHandle.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">com.badlogic.gdx.files</div>
|
|
<h2 title="Class FileHandle" class="title">Class FileHandle</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.badlogic.gdx.files.FileHandle</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>Direct Known Subclasses:</dt>
|
|
<dd><a href="../../../../com/badlogic/gdx/files/FileHandleStream.html" title="class in com.badlogic.gdx.files">FileHandleStream</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="typeNameLabel">FileHandle</span>
|
|
extends java.lang.Object</pre>
|
|
<div class="block">Represents a file or directory on the filesystem, classpath, Android SD card, or Android assets directory. FileHandles are
|
|
created via a <a href="../../../../com/badlogic/gdx/Files.html" title="interface in com.badlogic.gdx"><code>Files</code></a> instance.
|
|
|
|
Because some of the file types are backed by composite files and may be compressed (for example, if they are in an Android .apk
|
|
or are found via the classpath), the methods for extracting a <a href="../../../../com/badlogic/gdx/files/FileHandle.html#path--"><code>path()</code></a> or <a href="../../../../com/badlogic/gdx/files/FileHandle.html#file--"><code>file()</code></a> may not be appropriate for all
|
|
types. Use the Reader or Stream methods here to hide these dependencies from your platform independent code.</div>
|
|
<dl>
|
|
<dt><span class="simpleTagLabel">Author:</span></dt>
|
|
<dd>mzechner, Nathan Sweet</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
|
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Field and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected java.io.File</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#file">file</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>protected <a href="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#type">type</a></span></code> </td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier</th>
|
|
<th class="colLast" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#FileHandle--">FileHandle</a></span>()</code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code> </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#FileHandle-java.io.File-">FileHandle</a></span>(java.io.File file)</code>
|
|
<div class="block">Creates a new absolute FileHandle for the <code>File</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#FileHandle-java.io.File-com.badlogic.gdx.Files.FileType-">FileHandle</a></span>(java.io.File file,
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</a> type)</code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code> </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#FileHandle-java.lang.String-">FileHandle</a></span>(java.lang.String fileName)</code>
|
|
<div class="block">Creates a new absolute FileHandle for the file name.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#FileHandle-java.lang.String-com.badlogic.gdx.Files.FileType-">FileHandle</a></span>(java.lang.String fileName,
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</a> type)</code> </td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#child-java.lang.String-">child</a></span>(java.lang.String name)</code>
|
|
<div class="block">Returns a handle to the child with the specified name.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#copyTo-com.badlogic.gdx.files.FileHandle-">copyTo</a></span>(<a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> dest)</code>
|
|
<div class="block">Copies this file or directory to the specified file or directory.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#delete--">delete</a></span>()</code>
|
|
<div class="block">Deletes this file or empty directory and returns success.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#deleteDirectory--">deleteDirectory</a></span>()</code>
|
|
<div class="block">Deletes this file or directory and all children, recursively.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#emptyDirectory--">emptyDirectory</a></span>()</code>
|
|
<div class="block">Deletes all children of this directory, recursively.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#emptyDirectory-boolean-">emptyDirectory</a></span>(boolean preserveTree)</code>
|
|
<div class="block">Deletes all children of this directory, recursively.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#equals-java.lang.Object-">equals</a></span>(java.lang.Object obj)</code> </td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#exists--">exists</a></span>()</code>
|
|
<div class="block">Returns true if the file exists.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#extension--">extension</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>java.io.File</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#file--">file</a></span>()</code>
|
|
<div class="block">Returns a java.io.File that represents this file handle.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#hashCode--">hashCode</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#isDirectory--">isDirectory</a></span>()</code>
|
|
<div class="block">Returns true if this file is a directory.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#lastModified--">lastModified</a></span>()</code>
|
|
<div class="block">Returns the last modified time in milliseconds for this file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#length--">length</a></span>()</code>
|
|
<div class="block">Returns the length in bytes of this file, or 0 if this file is a directory, does not exist, or the size cannot otherwise be
|
|
determined.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>[]</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#list--">list</a></span>()</code>
|
|
<div class="block">Returns the paths to the children of this directory.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>[]</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#list-java.io.FileFilter-">list</a></span>(java.io.FileFilter filter)</code>
|
|
<div class="block">Returns the paths to the children of this directory that satisfy the specified filter.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>[]</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#list-java.io.FilenameFilter-">list</a></span>(java.io.FilenameFilter filter)</code>
|
|
<div class="block">Returns the paths to the children of this directory that satisfy the specified filter.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>[]</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#list-java.lang.String-">list</a></span>(java.lang.String suffix)</code>
|
|
<div class="block">Returns the paths to the children of this directory with the specified suffix.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#mkdirs--">mkdirs</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i19" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#moveTo-com.badlogic.gdx.files.FileHandle-">moveTo</a></span>(<a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> dest)</code>
|
|
<div class="block">Moves this file to the specified file, overwriting the file if it already exists.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i20" class="altColor">
|
|
<td class="colFirst"><code>java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#name--">name</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i21" class="rowColor">
|
|
<td class="colFirst"><code>java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#nameWithoutExtension--">nameWithoutExtension</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i22" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#parent--">parent</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i23" class="rowColor">
|
|
<td class="colFirst"><code>java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#path--">path</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i24" class="altColor">
|
|
<td class="colFirst"><code>java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#pathWithoutExtension--">pathWithoutExtension</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i25" class="rowColor">
|
|
<td class="colFirst"><code>java.io.InputStream</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#read--">read</a></span>()</code>
|
|
<div class="block">Returns a stream for reading this file as bytes.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i26" class="altColor">
|
|
<td class="colFirst"><code>java.io.BufferedInputStream</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#read-int-">read</a></span>(int bufferSize)</code>
|
|
<div class="block">Returns a buffered stream for reading this file as bytes.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i27" class="rowColor">
|
|
<td class="colFirst"><code>byte[]</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#readBytes--">readBytes</a></span>()</code>
|
|
<div class="block">Reads the entire file into a byte array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i28" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#readBytes-byte:A-int-int-">readBytes</a></span>(byte[] bytes,
|
|
int offset,
|
|
int size)</code>
|
|
<div class="block">Reads the entire file into the byte array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i29" class="rowColor">
|
|
<td class="colFirst"><code>java.io.Reader</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#reader--">reader</a></span>()</code>
|
|
<div class="block">Returns a reader for reading this file as characters.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i30" class="altColor">
|
|
<td class="colFirst"><code>java.io.BufferedReader</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#reader-int-">reader</a></span>(int bufferSize)</code>
|
|
<div class="block">Returns a buffered reader for reading this file as characters.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i31" class="rowColor">
|
|
<td class="colFirst"><code>java.io.BufferedReader</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#reader-int-java.lang.String-">reader</a></span>(int bufferSize,
|
|
java.lang.String charset)</code>
|
|
<div class="block">Returns a buffered reader for reading this file as characters.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i32" class="altColor">
|
|
<td class="colFirst"><code>java.io.Reader</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#reader-java.lang.String-">reader</a></span>(java.lang.String charset)</code>
|
|
<div class="block">Returns a reader for reading this file as characters.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i33" class="rowColor">
|
|
<td class="colFirst"><code>java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#readString--">readString</a></span>()</code>
|
|
<div class="block">Reads the entire file into a string using the platform's default charset.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i34" class="altColor">
|
|
<td class="colFirst"><code>java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#readString-java.lang.String-">readString</a></span>(java.lang.String charset)</code>
|
|
<div class="block">Reads the entire file into a string using the specified charset.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i35" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#sibling-java.lang.String-">sibling</a></span>(java.lang.String name)</code>
|
|
<div class="block">Returns a handle to the sibling with the specified name.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i36" class="altColor">
|
|
<td class="colFirst"><code>static <a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#tempDirectory-java.lang.String-">tempDirectory</a></span>(java.lang.String prefix)</code> </td>
|
|
</tr>
|
|
<tr id="i37" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#tempFile-java.lang.String-">tempFile</a></span>(java.lang.String prefix)</code> </td>
|
|
</tr>
|
|
<tr id="i38" class="altColor">
|
|
<td class="colFirst"><code>java.lang.String</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#toString--">toString</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i39" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#type--">type</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i40" class="altColor">
|
|
<td class="colFirst"><code>java.io.OutputStream</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#write-boolean-">write</a></span>(boolean append)</code>
|
|
<div class="block">Returns a stream for writing to this file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i41" class="rowColor">
|
|
<td class="colFirst"><code>java.io.OutputStream</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#write-boolean-int-">write</a></span>(boolean append,
|
|
int bufferSize)</code>
|
|
<div class="block">Returns a buffered stream for writing to this file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i42" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#write-java.io.InputStream-boolean-">write</a></span>(java.io.InputStream input,
|
|
boolean append)</code>
|
|
<div class="block">Reads the remaining bytes from the specified stream and writes them to this file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i43" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#writeBytes-byte:A-boolean-">writeBytes</a></span>(byte[] bytes,
|
|
boolean append)</code>
|
|
<div class="block">Writes the specified bytes to the file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i44" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#writeBytes-byte:A-int-int-boolean-">writeBytes</a></span>(byte[] bytes,
|
|
int offset,
|
|
int length,
|
|
boolean append)</code>
|
|
<div class="block">Writes the specified bytes to the file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i45" class="rowColor">
|
|
<td class="colFirst"><code>java.io.Writer</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#writer-boolean-">writer</a></span>(boolean append)</code>
|
|
<div class="block">Returns a writer for writing to this file using the default charset.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i46" class="altColor">
|
|
<td class="colFirst"><code>java.io.Writer</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#writer-boolean-java.lang.String-">writer</a></span>(boolean append,
|
|
java.lang.String charset)</code>
|
|
<div class="block">Returns a writer for writing to this file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i47" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#writeString-java.lang.String-boolean-">writeString</a></span>(java.lang.String string,
|
|
boolean append)</code>
|
|
<div class="block">Writes the specified string to the file using the default charset.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i48" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/files/FileHandle.html#writeString-java.lang.String-boolean-java.lang.String-">writeString</a></span>(java.lang.String string,
|
|
boolean append,
|
|
java.lang.String charset)</code>
|
|
<div class="block">Writes the specified string to the file using the specified charset.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Detail</h3>
|
|
<a name="file">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>file</h4>
|
|
<pre>protected java.io.File file</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="type">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>type</h4>
|
|
<pre>protected <a href="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</a> type</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="FileHandle--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>FileHandle</h4>
|
|
<pre>protected FileHandle()</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="FileHandle-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>FileHandle</h4>
|
|
<pre>public FileHandle(java.lang.String fileName)</pre>
|
|
<div class="block">Creates a new absolute FileHandle for the file name. Use this for tools on the desktop that don't need any of the backends.
|
|
Do not use this constructor in case you write something cross-platform. Use the <a href="../../../../com/badlogic/gdx/Files.html" title="interface in com.badlogic.gdx"><code>Files</code></a> interface instead.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>fileName</code> - the filename.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="FileHandle-java.io.File-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>FileHandle</h4>
|
|
<pre>public FileHandle(java.io.File file)</pre>
|
|
<div class="block">Creates a new absolute FileHandle for the <code>File</code>. Use this for tools on the desktop that don't need any of the
|
|
backends. Do not use this constructor in case you write something cross-platform. Use the <a href="../../../../com/badlogic/gdx/Files.html" title="interface in com.badlogic.gdx"><code>Files</code></a> interface instead.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>file</code> - the file.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="FileHandle-java.lang.String-com.badlogic.gdx.Files.FileType-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>FileHandle</h4>
|
|
<pre>protected FileHandle(java.lang.String fileName,
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</a> type)</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="FileHandle-java.io.File-com.badlogic.gdx.Files.FileType-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>FileHandle</h4>
|
|
<pre>protected FileHandle(java.io.File file,
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</a> type)</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="path--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>path</h4>
|
|
<pre>public java.lang.String path()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the path of the file as specified on construction, e.g. Gdx.files.internal("dir/file.png") -> dir/file.png.
|
|
backward slashes will be replaced by forward slashes.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="name--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>name</h4>
|
|
<pre>public java.lang.String name()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the name of the file, without any parent paths.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="extension--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>extension</h4>
|
|
<pre>public java.lang.String extension()</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="nameWithoutExtension--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>nameWithoutExtension</h4>
|
|
<pre>public java.lang.String nameWithoutExtension()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the name of the file, without parent paths or the extension.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="pathWithoutExtension--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>pathWithoutExtension</h4>
|
|
<pre>public java.lang.String pathWithoutExtension()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the path and filename without the extension, e.g. dir/dir2/file.png -> dir/dir2/file. backward slashes will be
|
|
returned as forward slashes.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="type--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>type</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</a> type()</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="file--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>file</h4>
|
|
<pre>public java.io.File file()</pre>
|
|
<div class="block">Returns a java.io.File that represents this file handle. Note the returned file will only be usable for
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html#Absolute"><code>Files.FileType.Absolute</code></a> and <a href="../../../../com/badlogic/gdx/Files.FileType.html#External"><code>Files.FileType.External</code></a> file handles.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="read--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>read</h4>
|
|
<pre>public java.io.InputStream read()</pre>
|
|
<div class="block">Returns a stream for reading this file as bytes.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if the file handle represents a directory, doesn't exist, or could not be read.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="read-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>read</h4>
|
|
<pre>public java.io.BufferedInputStream read(int bufferSize)</pre>
|
|
<div class="block">Returns a buffered stream for reading this file as bytes.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if the file handle represents a directory, doesn't exist, or could not be read.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="reader--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>reader</h4>
|
|
<pre>public java.io.Reader reader()</pre>
|
|
<div class="block">Returns a reader for reading this file as characters.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if the file handle represents a directory, doesn't exist, or could not be read.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="reader-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>reader</h4>
|
|
<pre>public java.io.Reader reader(java.lang.String charset)</pre>
|
|
<div class="block">Returns a reader for reading this file as characters.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if the file handle represents a directory, doesn't exist, or could not be read.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="reader-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>reader</h4>
|
|
<pre>public java.io.BufferedReader reader(int bufferSize)</pre>
|
|
<div class="block">Returns a buffered reader for reading this file as characters.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if the file handle represents a directory, doesn't exist, or could not be read.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="reader-int-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>reader</h4>
|
|
<pre>public java.io.BufferedReader reader(int bufferSize,
|
|
java.lang.String charset)</pre>
|
|
<div class="block">Returns a buffered reader for reading this file as characters.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if the file handle represents a directory, doesn't exist, or could not be read.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="readString--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readString</h4>
|
|
<pre>public java.lang.String readString()</pre>
|
|
<div class="block">Reads the entire file into a string using the platform's default charset.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if the file handle represents a directory, doesn't exist, or could not be read.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="readString-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readString</h4>
|
|
<pre>public java.lang.String readString(java.lang.String charset)</pre>
|
|
<div class="block">Reads the entire file into a string using the specified charset.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>charset</code> - If null the default charset is used.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if the file handle represents a directory, doesn't exist, or could not be read.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="readBytes--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readBytes</h4>
|
|
<pre>public byte[] readBytes()</pre>
|
|
<div class="block">Reads the entire file into a byte array.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if the file handle represents a directory, doesn't exist, or could not be read.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="readBytes-byte:A-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readBytes</h4>
|
|
<pre>public int readBytes(byte[] bytes,
|
|
int offset,
|
|
int size)</pre>
|
|
<div class="block">Reads the entire file into the byte array. The byte array must be big enough to hold the file's data.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>bytes</code> - the array to load the file into</dd>
|
|
<dd><code>offset</code> - the offset to start writing bytes</dd>
|
|
<dd><code>size</code> - the number of bytes to read, see <a href="../../../../com/badlogic/gdx/files/FileHandle.html#length--"><code>length()</code></a></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the number of read bytes</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="write-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>write</h4>
|
|
<pre>public java.io.OutputStream write(boolean append)</pre>
|
|
<div class="block">Returns a stream for writing to this file. Parent directories will be created if necessary.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>append</code> - If false, this file will be overwritten if it exists, otherwise it will be appended.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file handle represents a directory, if it is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> file, or if it could not be written.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="write-boolean-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>write</h4>
|
|
<pre>public java.io.OutputStream write(boolean append,
|
|
int bufferSize)</pre>
|
|
<div class="block">Returns a buffered stream for writing to this file. Parent directories will be created if necessary.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>append</code> - If false, this file will be overwritten if it exists, otherwise it will be appended.</dd>
|
|
<dd><code>bufferSize</code> - The size of the buffer.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file handle represents a directory, if it is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> file, or if it could not be written.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="write-java.io.InputStream-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>write</h4>
|
|
<pre>public void write(java.io.InputStream input,
|
|
boolean append)</pre>
|
|
<div class="block">Reads the remaining bytes from the specified stream and writes them to this file. The stream is closed. Parent directories
|
|
will be created if necessary.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>append</code> - If false, this file will be overwritten if it exists, otherwise it will be appended.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file handle represents a directory, if it is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> file, or if it could not be written.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="writer-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>writer</h4>
|
|
<pre>public java.io.Writer writer(boolean append)</pre>
|
|
<div class="block">Returns a writer for writing to this file using the default charset. Parent directories will be created if necessary.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>append</code> - If false, this file will be overwritten if it exists, otherwise it will be appended.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file handle represents a directory, if it is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> file, or if it could not be written.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="writer-boolean-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>writer</h4>
|
|
<pre>public java.io.Writer writer(boolean append,
|
|
java.lang.String charset)</pre>
|
|
<div class="block">Returns a writer for writing to this file. Parent directories will be created if necessary.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>append</code> - If false, this file will be overwritten if it exists, otherwise it will be appended.</dd>
|
|
<dd><code>charset</code> - May be null to use the default charset.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file handle represents a directory, if it is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> file, or if it could not be written.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="writeString-java.lang.String-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>writeString</h4>
|
|
<pre>public void writeString(java.lang.String string,
|
|
boolean append)</pre>
|
|
<div class="block">Writes the specified string to the file using the default charset. Parent directories will be created if necessary.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>append</code> - If false, this file will be overwritten if it exists, otherwise it will be appended.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file handle represents a directory, if it is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> file, or if it could not be written.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="writeString-java.lang.String-boolean-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>writeString</h4>
|
|
<pre>public void writeString(java.lang.String string,
|
|
boolean append,
|
|
java.lang.String charset)</pre>
|
|
<div class="block">Writes the specified string to the file using the specified charset. Parent directories will be created if necessary.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>append</code> - If false, this file will be overwritten if it exists, otherwise it will be appended.</dd>
|
|
<dd><code>charset</code> - May be null to use the default charset.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file handle represents a directory, if it is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> file, or if it could not be written.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="writeBytes-byte:A-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>writeBytes</h4>
|
|
<pre>public void writeBytes(byte[] bytes,
|
|
boolean append)</pre>
|
|
<div class="block">Writes the specified bytes to the file. Parent directories will be created if necessary.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>append</code> - If false, this file will be overwritten if it exists, otherwise it will be appended.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file handle represents a directory, if it is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> file, or if it could not be written.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="writeBytes-byte:A-int-int-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>writeBytes</h4>
|
|
<pre>public void writeBytes(byte[] bytes,
|
|
int offset,
|
|
int length,
|
|
boolean append)</pre>
|
|
<div class="block">Writes the specified bytes to the file. Parent directories will be created if necessary.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>append</code> - If false, this file will be overwritten if it exists, otherwise it will be appended.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file handle represents a directory, if it is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> file, or if it could not be written.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="list--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>list</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>[] list()</pre>
|
|
<div class="block">Returns the paths to the children of this directory. Returns an empty list if this file handle represents a file and not a
|
|
directory. On the desktop, an <a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> handle to a directory on the classpath will return a zero length
|
|
array.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file is an <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> file.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="list-java.io.FileFilter-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>list</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>[] list(java.io.FileFilter filter)</pre>
|
|
<div class="block">Returns the paths to the children of this directory that satisfy the specified filter. Returns an empty list if this file
|
|
handle represents a file and not a directory. On the desktop, an <a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> handle to a directory on the
|
|
classpath will return a zero length array.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>filter</code> - the <code>FileFilter</code> to filter files</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file is an <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> file.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="list-java.io.FilenameFilter-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>list</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>[] list(java.io.FilenameFilter filter)</pre>
|
|
<div class="block">Returns the paths to the children of this directory that satisfy the specified filter. Returns an empty list if this file
|
|
handle represents a file and not a directory. On the desktop, an <a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> handle to a directory on the
|
|
classpath will return a zero length array.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>filter</code> - the <code>FilenameFilter</code> to filter files</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file is an <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> file.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="list-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>list</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>[] list(java.lang.String suffix)</pre>
|
|
<div class="block">Returns the paths to the children of this directory with the specified suffix. Returns an empty list if this file handle
|
|
represents a file and not a directory. On the desktop, an <a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> handle to a directory on the classpath
|
|
will return a zero length array.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file is an <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> file.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isDirectory--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isDirectory</h4>
|
|
<pre>public boolean isDirectory()</pre>
|
|
<div class="block">Returns true if this file is a directory. Always returns false for classpath files. On Android, an
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> handle to an empty directory will return false. On the desktop, an <a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a>
|
|
handle to a directory on the classpath will return false.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="child-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>child</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> child(java.lang.String name)</pre>
|
|
<div class="block">Returns a handle to the child with the specified name.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="sibling-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>sibling</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> sibling(java.lang.String name)</pre>
|
|
<div class="block">Returns a handle to the sibling with the specified name.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file is the root.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="parent--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>parent</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> parent()</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="mkdirs--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>mkdirs</h4>
|
|
<pre>public void mkdirs()</pre>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file handle is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or <a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> file.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="exists--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>exists</h4>
|
|
<pre>public boolean exists()</pre>
|
|
<div class="block">Returns true if the file exists. On Android, a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or <a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> handle to a
|
|
directory will always return false. Note that this can be very slow for internal files on Android!</div>
|
|
</li>
|
|
</ul>
|
|
<a name="delete--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>delete</h4>
|
|
<pre>public boolean delete()</pre>
|
|
<div class="block">Deletes this file or empty directory and returns success. Will not delete a directory that has children.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file handle is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or <a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> file.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="deleteDirectory--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>deleteDirectory</h4>
|
|
<pre>public boolean deleteDirectory()</pre>
|
|
<div class="block">Deletes this file or directory and all children, recursively.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file handle is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or <a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> file.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="emptyDirectory--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>emptyDirectory</h4>
|
|
<pre>public void emptyDirectory()</pre>
|
|
<div class="block">Deletes all children of this directory, recursively.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file handle is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or <a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> file.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="emptyDirectory-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>emptyDirectory</h4>
|
|
<pre>public void emptyDirectory(boolean preserveTree)</pre>
|
|
<div class="block">Deletes all children of this directory, recursively. Optionally preserving the folder structure.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if this file handle is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or <a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> file.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="copyTo-com.badlogic.gdx.files.FileHandle-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>copyTo</h4>
|
|
<pre>public void copyTo(<a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> dest)</pre>
|
|
<div class="block">Copies this file or directory to the specified file or directory. If this handle is a file, then 1) if the destination is a
|
|
file, it is overwritten, or 2) if the destination is a directory, this file is copied into it, or 3) if the destination
|
|
doesn't exist, <a href="../../../../com/badlogic/gdx/files/FileHandle.html#mkdirs--"><code>mkdirs()</code></a> is called on the destination's parent and this file is copied into it with a new name. If
|
|
this handle is a directory, then 1) if the destination is a file, GdxRuntimeException is thrown, or 2) if the destination is
|
|
a directory, this directory is copied into it recursively, overwriting existing files, or 3) if the destination doesn't
|
|
exist, <a href="../../../../com/badlogic/gdx/files/FileHandle.html#mkdirs--"><code>mkdirs()</code></a> is called on the destination and this directory is copied into it recursively.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if the destination file handle is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or <a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a>
|
|
file, or copying failed.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="moveTo-com.badlogic.gdx.files.FileHandle-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>moveTo</h4>
|
|
<pre>public void moveTo(<a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> dest)</pre>
|
|
<div class="block">Moves this file to the specified file, overwriting the file if it already exists.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils">GdxRuntimeException</a></code> - if the source or destination file handle is a <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> or
|
|
<a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> file.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="length--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>length</h4>
|
|
<pre>public long length()</pre>
|
|
<div class="block">Returns the length in bytes of this file, or 0 if this file is a directory, does not exist, or the size cannot otherwise be
|
|
determined.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="lastModified--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>lastModified</h4>
|
|
<pre>public long lastModified()</pre>
|
|
<div class="block">Returns the last modified time in milliseconds for this file. Zero is returned if the file doesn't exist. Zero is returned
|
|
for <a href="../../../../com/badlogic/gdx/Files.FileType.html#Classpath"><code>Files.FileType.Classpath</code></a> files. On Android, zero is returned for <a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> files. On the desktop, zero
|
|
is returned for <a href="../../../../com/badlogic/gdx/Files.FileType.html#Internal"><code>Files.FileType.Internal</code></a> files on the classpath.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="equals-java.lang.Object-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>equals</h4>
|
|
<pre>public boolean equals(java.lang.Object obj)</pre>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>equals</code> in class <code>java.lang.Object</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="hashCode--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>hashCode</h4>
|
|
<pre>public int hashCode()</pre>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>hashCode</code> in class <code>java.lang.Object</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="toString--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>toString</h4>
|
|
<pre>public java.lang.String toString()</pre>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="tempFile-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>tempFile</h4>
|
|
<pre>public static <a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> tempFile(java.lang.String prefix)</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="tempDirectory-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>tempDirectory</h4>
|
|
<pre>public static <a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> tempDirectory(java.lang.String prefix)</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/FileHandle.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage">libgdx API</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li>Prev Class</li>
|
|
<li><a href="../../../../com/badlogic/gdx/files/FileHandleStream.html" title="class in com.badlogic.gdx.files"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/badlogic/gdx/files/FileHandle.html" target="_top">Frames</a></li>
|
|
<li><a href="FileHandle.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
<p class="legalCopy"><small>
|
|
<div style="font-size:9pt"><i>
|
|
Copyright © 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
|
|
</i></div>
|
|
</small></p>
|
|
</body>
|
|
</html>
|