|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.os.FileUtils
public class FileUtils
Tools for managing files. Not for public consumption.
| Nested Class Summary | |
|---|---|
static class |
FileUtils.FileStatus
File status information. |
| Field Summary | |
|---|---|
static int |
S_IRGRP
|
static int |
S_IROTH
|
static int |
S_IRUSR
|
static int |
S_IRWXG
|
static int |
S_IRWXO
|
static int |
S_IRWXU
|
static int |
S_IWGRP
|
static int |
S_IWOTH
|
static int |
S_IWUSR
|
static int |
S_IXGRP
|
static int |
S_IXOTH
|
static int |
S_IXUSR
|
| Constructor Summary | |
|---|---|
FileUtils()
|
|
| Method Summary | |
|---|---|
static boolean |
copyFile(File srcFile,
File destFile)
|
static boolean |
copyToFile(InputStream inputStream,
File destFile)
Copy data from a source stream to destFile. |
static int |
getFatVolumeId(String mountPoint)
returns the FAT file system volume ID for the volume mounted at the given mount point, or -1 for failure |
static boolean |
getFileStatus(String path,
FileUtils.FileStatus status)
Get the status for the given path. |
static int |
getPermissions(String file,
int[] outPermissions)
|
static boolean |
isFilenameSafe(File file)
Check if a filename is "safe" (no metacharacters or spaces). |
static String |
readTextFile(File file,
int max,
String ellipsis)
Read a text file into a String, optionally limiting the length. |
static int |
setPermissions(String file,
int mode,
int uid,
int gid)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int S_IRWXU
public static final int S_IRUSR
public static final int S_IWUSR
public static final int S_IXUSR
public static final int S_IRWXG
public static final int S_IRGRP
public static final int S_IWGRP
public static final int S_IXGRP
public static final int S_IRWXO
public static final int S_IROTH
public static final int S_IWOTH
public static final int S_IXOTH
| Constructor Detail |
|---|
public FileUtils()
| Method Detail |
|---|
public static boolean getFileStatus(String path,
FileUtils.FileStatus status)
path - The path of the file to be stat'd.status - Optional argument to fill in. It will only fill in the status if the file
exists.
public static int setPermissions(String file,
int mode,
int uid,
int gid)
public static int getPermissions(String file,
int[] outPermissions)
public static int getFatVolumeId(String mountPoint)
mount - point for FAT volume
public static boolean copyFile(File srcFile,
File destFile)
public static boolean copyToFile(InputStream inputStream,
File destFile)
public static boolean isFilenameSafe(File file)
file - The file to check
public static String readTextFile(File file,
int max,
String ellipsis)
throws IOException
file - to read (will not seek, so things like /proc files are OK)max - length (positive for head, negative of tail, 0 for no limit)ellipsis - to add of the file was truncated (can be null)
IOException - if something goes wrong reading the file
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||