@Override public File getAbsoluteFile() { String path = getAbsolutePath(); return path == null ? null : new JavaSecuredFile(path); }
@Override public File getCanonicalFile() throws IOException { String path = getCanonicalPath(); return path == null ? null : new JavaSecuredFile(path); }
@Override public File getCanonicalFile() throws IOException { String path = getCanonicalPath(); return path == null ? null : new JavaSecuredFile(path); }
@Override public File getParentFile() { String parent = getParent(); if (parent != null) { return new JavaSecuredFile(parent); } else { return null; } }
@Override public File getCanonicalFile() throws IOException { String canonical = getCanonicalPath(); if (canonical != null) { return new JavaSecuredFile(canonical); } else { return null; } }
public int mkdir(String path, int mode) { File dir = new JavaSecuredFile(path); if (!dir.mkdir()) return -1; chmod(path, mode); return 0; }
@Override public File getParentFile() { String path = getParent(); return path == null ? null : new JavaSecuredFile(path); }
@Override public File getCanonicalFile() throws IOException { String path = getCanonicalPath(); return path == null ? null : new JavaSecuredFile(path); }
@Override public File getParentFile() { String path = getParent(); return path == null ? null : new JavaSecuredFile(path); }
@Override public File getAbsoluteFile() { String absolute = getAbsolutePath(); if (absolute != null) { return new JavaSecuredFile(absolute); } else { return null; } }
@Override public File getParentFile() { String path = getParent(); return path == null ? null : new JavaSecuredFile(path); }
@Override public File getAbsoluteFile() { String path = getAbsolutePath(); return path == null ? null : new JavaSecuredFile(path); }
public int mkdir(String path, int mode) { File dir = new JavaSecuredFile(path); if (!dir.mkdir()) return -1; chmod(path, mode); return 0; }
@Override public File getAbsoluteFile() { String path = getAbsolutePath(); return path == null ? null : new JavaSecuredFile(path); }
public int mkdir(String path, int mode) { File dir = new JavaSecuredFile(path); if (!dir.mkdir()) return -1; chmod(path, mode); return 0; }
public int mkdir(String path, int mode) { File dir = new JavaSecuredFile(path); if (!dir.mkdir()) return -1; chmod(path, mode); return 0; }
public int lstat(String path, FileStat stat) { File file = new JavaSecuredFile(path); if (!file.exists()) { errno(ENOENT); return -1; } // FIXME: Bulletproof this or no? JavaFileStat jstat = (JavaFileStat) stat; jstat.setup(path); // TODO: Add error reporting for cases we can calculate: ENOTDIR, ENAMETOOLONG, ENOENT // EACCES, ELOOP, EFAULT, EIO return 0; }
public int lstat(String path, FileStat stat) { File file = new JavaSecuredFile(path); if (!file.exists()) handler.error(ENOENT, "lstat", path); // FIXME: Bulletproof this or no? JavaFileStat jstat = (JavaFileStat) stat; jstat.setup(path); // TODO: Add error reporting for cases we can calculate: ENOTDIR, ENAMETOOLONG, ENOENT // EACCES, ELOOP, EFAULT, EIO return 0; }
public int lstat(String path, FileStat stat) { File file = new JavaSecuredFile(path); if (!file.exists()) { errno(ENOENT); return -1; } // FIXME: Bulletproof this or no? JavaFileStat jstat = (JavaFileStat) stat; jstat.setup(path); // TODO: Add error reporting for cases we can calculate: ENOTDIR, ENAMETOOLONG, ENOENT // EACCES, ELOOP, EFAULT, EIO return 0; }
public int lstat(String path, FileStat stat) { File file = new JavaSecuredFile(path); if (!file.exists()) { errno(ENOENT); return -1; } // FIXME: Bulletproof this or no? JavaFileStat jstat = (JavaFileStat) stat; jstat.setup(path); // TODO: Add error reporting for cases we can calculate: ENOTDIR, ENAMETOOLONG, ENOENT // EACCES, ELOOP, EFAULT, EIO return 0; }