diff options
| author | Kenny Root <kroot@google.com> | 2012-08-16 16:33:40 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2012-08-16 16:33:40 -0700 |
| commit | 050c87f87e2a48c7bc90f5b15fb6e4e37e667286 (patch) | |
| tree | 814988aae175fa4081aa6d53a91161608cc3646f /core/java/android/os/FileUtils.java | |
| parent | b18bcf13fd47102a2527e599cde0b1d59ab7c51e (diff) | |
| parent | a950daf5c14a0009c2c62e9c3e0e8d51eb0cf7d9 (diff) | |
am a950daf5: Merge changes Ieb566a2a,I953057cd
* commit 'a950daf5c14a0009c2c62e9c3e0e8d51eb0cf7d9':
Use Libcore's stat instead of FileUtils#getFileStatus
Use Libcore.os.stat instead of FileUtils
Diffstat (limited to 'core/java/android/os/FileUtils.java')
| -rw-r--r-- | core/java/android/os/FileUtils.java | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/core/java/android/os/FileUtils.java b/core/java/android/os/FileUtils.java index 6c1445df74a0..7c103aaa1484 100644 --- a/core/java/android/os/FileUtils.java +++ b/core/java/android/os/FileUtils.java @@ -28,9 +28,6 @@ import java.util.regex.Pattern; import java.util.zip.CRC32; import java.util.zip.CheckedInputStream; -import libcore.io.Os; -import libcore.io.StructStat; - /** * Tools for managing files. Not for public consumption. * @hide @@ -50,58 +47,12 @@ public class FileUtils { public static final int S_IROTH = 00004; public static final int S_IWOTH = 00002; public static final int S_IXOTH = 00001; - - - /** - * File status information. This class maps directly to the POSIX stat structure. - * @deprecated use {@link StructStat} instead. - * @hide - */ - @Deprecated - public static final class FileStatus { - public int dev; - public int ino; - public int mode; - public int nlink; - public int uid; - public int gid; - public int rdev; - public long size; - public int blksize; - public long blocks; - public long atime; - public long mtime; - public long ctime; - } - - /** - * Get the status for the given path. This is equivalent to the POSIX stat(2) system call. - * @param path The path of the file to be stat'd. - * @param status Optional argument to fill in. It will only fill in the status if the file - * exists. - * @return true if the file exists and false if it does not exist. If you do not have - * permission to stat the file, then this method will return false. - * @deprecated use {@link Os#stat(String)} instead. - */ - @Deprecated - public static boolean getFileStatus(String path, FileStatus status) { - StrictMode.noteDiskRead(); - return getFileStatusNative(path, status); - } - - private static native boolean getFileStatusNative(String path, FileStatus status); /** Regular expression for safe filenames: no spaces or metacharacters */ private static final Pattern SAFE_FILENAME_PATTERN = Pattern.compile("[\\w%+,./=_-]+"); public static native int setPermissions(String file, int mode, int uid, int gid); - /** - * @deprecated use {@link Os#stat(String)} instead. - */ - @Deprecated - public static native int getPermissions(String file, int[] outPermissions); - public static native int setUMask(int mask); /** returns the FAT file system volume ID for the volume mounted |
