Subversion Repositories AndroidProjects

Rev

Blame | Last modification | View Log | RSS feed

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Sun Sep 18 18:13:16 EDT 2011 -->
<TITLE>
FileHandle (libgdx API)
</TITLE>

<META NAME="date" CONTENT="2011-09-18">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="FileHandle (libgdx API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/FileHandle.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>

                                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>
                        </EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../com/badlogic/gdx/files/FileHandleStream.html" title="class in com.badlogic.gdx.files"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/badlogic/gdx/files/FileHandle.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="FileHandle.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
 if(window==top) {
   document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
 }
 //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.badlogic.gdx.files</FONT>
<BR>
Class FileHandle</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.files.FileHandle</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../com/badlogic/gdx/files/FileHandleStream.html" title="class in com.badlogic.gdx.files">FileHandleStream</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>FileHandle</B><DT>extends java.lang.Object</DL>
</PRE>

<P>
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.
<P>

<P>
<DL>
<DT><B>Author:</B></DT>
  <DD>mzechner, Nathan Sweet</DD>
</DL>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.io.File</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#file">file</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#type">type</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#FileHandle()">FileHandle</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#FileHandle(java.io.File)">FileHandle</A></B>(java.io.File&nbsp;file)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new absolute FileHandle for the <CODE>File</CODE>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#FileHandle(java.io.File, com.badlogic.gdx.Files.FileType)">FileHandle</A></B>(java.io.File&nbsp;file,
           <A HREF="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</A>&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#FileHandle(java.lang.String)">FileHandle</A></B>(java.lang.String&nbsp;fileName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new absolute FileHandle for the file name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#FileHandle(java.lang.String, com.badlogic.gdx.Files.FileType)">FileHandle</A></B>(java.lang.String&nbsp;fileName,
           <A HREF="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</A>&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#child(java.lang.String)">child</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a handle to the child with the specified name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#copyTo(com.badlogic.gdx.files.FileHandle)">copyTo</A></B>(<A HREF="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;dest)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copies this file to the specified file, overwriting the file if it already exists.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#delete()">delete</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deletes this file or empty directory and returns success.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#deleteDirectory()">deleteDirectory</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deletes this file or directory and all children, recursively.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#exists()">exists</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the file exists.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#extension()">extension</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#isDirectory()">isDirectory</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if this file is a directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#length()">length</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#list()">list</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the paths to the children of this directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#list(java.lang.String)">list</A></B>(java.lang.String&nbsp;suffix)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the paths to the children of this directory with the specified suffix.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#mkdirs()">mkdirs</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#moveTo(com.badlogic.gdx.files.FileHandle)">moveTo</A></B>(<A HREF="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;dest)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves this file to the specified file, overwriting the file if it already exists.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#name()">name</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#nameWithoutExtension()">nameWithoutExtension</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#parent()">parent</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#path()">path</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.io.InputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#read()">read</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a stream for reading this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#readBytes()">readBytes</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads the entire file into a byte array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#readString()">readString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads the entire file into a string using the platform's default charset.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#readString(java.lang.String)">readString</A></B>(java.lang.String&nbsp;charset)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads the entire file into a string using the specified charset.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#type()">type</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.io.OutputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#write(boolean)">write</A></B>(boolean&nbsp;append)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a stream for writing to this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.io.Writer</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/files/FileHandle.html#writer(boolean)">writer</A></B>(boolean&nbsp;append)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a writer for writing to this file.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="file"><!-- --></A><H3>
file</H3>
<PRE>
protected java.io.File <B>file</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="type"><!-- --></A><H3>
type</H3>
<PRE>
protected <A HREF="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</A> <B>type</B></PRE>
<DL>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="FileHandle()"><!-- --></A><H3>
FileHandle</H3>
<PRE>
protected <B>FileHandle</B>()</PRE>
<DL>
</DL>
<HR>

<A NAME="FileHandle(java.lang.String)"><!-- --></A><H3>
FileHandle</H3>
<PRE>
public <B>FileHandle</B>(java.lang.String&nbsp;fileName)</PRE>
<DL>
<DD>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.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>fileName</CODE> - the filename.</DL>
</DL>
<HR>

<A NAME="FileHandle(java.io.File)"><!-- --></A><H3>
FileHandle</H3>
<PRE>
public <B>FileHandle</B>(java.io.File&nbsp;file)</PRE>
<DL>
<DD>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.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>file</CODE> - the file.</DL>
</DL>
<HR>

<A NAME="FileHandle(java.lang.String, com.badlogic.gdx.Files.FileType)"><!-- --></A><H3>
FileHandle</H3>
<PRE>
protected <B>FileHandle</B>(java.lang.String&nbsp;fileName,
                     <A HREF="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</A>&nbsp;type)</PRE>
<DL>
</DL>
<HR>

<A NAME="FileHandle(java.io.File, com.badlogic.gdx.Files.FileType)"><!-- --></A><H3>
FileHandle</H3>
<PRE>
protected <B>FileHandle</B>(java.io.File&nbsp;file,
                     <A HREF="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</A>&nbsp;type)</PRE>
<DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="path()"><!-- --></A><H3>
path</H3>
<PRE>
public java.lang.String <B>path</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="name()"><!-- --></A><H3>
name</H3>
<PRE>
public java.lang.String <B>name</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="extension()"><!-- --></A><H3>
extension</H3>
<PRE>
public java.lang.String <B>extension</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="nameWithoutExtension()"><!-- --></A><H3>
nameWithoutExtension</H3>
<PRE>
public java.lang.String <B>nameWithoutExtension</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="type()"><!-- --></A><H3>
type</H3>
<PRE>
public <A HREF="../../../../com/badlogic/gdx/Files.FileType.html" title="enum in com.badlogic.gdx">Files.FileType</A> <B>type</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="read()"><!-- --></A><H3>
read</H3>
<PRE>
public java.io.InputStream <B>read</B>()</PRE>
<DL>
<DD>Returns a stream for reading this file.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="readString()"><!-- --></A><H3>
readString</H3>
<PRE>
public java.lang.String <B>readString</B>()</PRE>
<DL>
<DD>Reads the entire file into a string using the platform's default charset.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="readString(java.lang.String)"><!-- --></A><H3>
readString</H3>
<PRE>
public java.lang.String <B>readString</B>(java.lang.String&nbsp;charset)</PRE>
<DL>
<DD>Reads the entire file into a string using the specified charset.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="readBytes()"><!-- --></A><H3>
readBytes</H3>
<PRE>
public byte[] <B>readBytes</B>()</PRE>
<DL>
<DD>Reads the entire file into a byte array.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="write(boolean)"><!-- --></A><H3>
write</H3>
<PRE>
public java.io.OutputStream <B>write</B>(boolean&nbsp;append)</PRE>
<DL>
<DD>Returns a stream for writing to this file.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>append</CODE> - If false, this file will be overwritten if it exists, otherwise it will be appended.</DL>
</DD>
</DL>
<HR>

<A NAME="writer(boolean)"><!-- --></A><H3>
writer</H3>
<PRE>
public java.io.Writer <B>writer</B>(boolean&nbsp;append)</PRE>
<DL>
<DD>Returns a writer for writing to this file.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>append</CODE> - If false, this file will be overwritten if it exists, otherwise it will be appended.</DL>
</DD>
</DL>
<HR>

<A NAME="list()"><!-- --></A><H3>
list</H3>
<PRE>
public <A HREF="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>[] <B>list</B>()</PRE>
<DL>
<DD>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 internal handle to a directory on the classpath will return a zero length array.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="list(java.lang.String)"><!-- --></A><H3>
list</H3>
<PRE>
public <A HREF="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>[] <B>list</B>(java.lang.String&nbsp;suffix)</PRE>
<DL>
<DD>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 internal handle to a directory on the classpath will return a zero
 length array.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="isDirectory()"><!-- --></A><H3>
isDirectory</H3>
<PRE>
public boolean <B>isDirectory</B>()</PRE>
<DL>
<DD>Returns true if this file is a directory. Always returns false for classpath files. On Android, an internal handle to an
 empty directory will return false. On the desktop, an internal handle to a directory on the classpath will return false.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="child(java.lang.String)"><!-- --></A><H3>
child</H3>
<PRE>
public <A HREF="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A> <B>child</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Returns a handle to the child with the specified name.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="parent()"><!-- --></A><H3>
parent</H3>
<PRE>
public <A HREF="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A> <B>parent</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="mkdirs()"><!-- --></A><H3>
mkdirs</H3>
<PRE>
public void <B>mkdirs</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="exists()"><!-- --></A><H3>
exists</H3>
<PRE>
public boolean <B>exists</B>()</PRE>
<DL>
<DD>Returns true if the file exists. On Android, a classpath handle to a directory will always return false.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="delete()"><!-- --></A><H3>
delete</H3>
<PRE>
public boolean <B>delete</B>()</PRE>
<DL>
<DD>Deletes this file or empty directory and returns success. Will not delete a directory that has children.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="deleteDirectory()"><!-- --></A><H3>
deleteDirectory</H3>
<PRE>
public boolean <B>deleteDirectory</B>()</PRE>
<DL>
<DD>Deletes this file or directory and all children, recursively.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="copyTo(com.badlogic.gdx.files.FileHandle)"><!-- --></A><H3>
copyTo</H3>
<PRE>
public void <B>copyTo</B>(<A HREF="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;dest)</PRE>
<DL>
<DD>Copies this file to the specified file, overwriting the file if it already exists.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="moveTo(com.badlogic.gdx.files.FileHandle)"><!-- --></A><H3>
moveTo</H3>
<PRE>
public void <B>moveTo</B>(<A HREF="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</A>&nbsp;dest)</PRE>
<DL>
<DD>Moves this file to the specified file, overwriting the file if it already exists.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="length()"><!-- --></A><H3>
length</H3>
<PRE>
public long <B>length</B>()</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/FileHandle.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
libgdx API</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../com/badlogic/gdx/files/FileHandleStream.html" title="class in com.badlogic.gdx.files"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/badlogic/gdx/files/FileHandle.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="FileHandle.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
 if(window==top) {
   document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
 }
 //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

                                <div style="font-size:9pt"><i>
                                Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
                                </i></div>
                       
</BODY>
</HTML>