/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Unix implementation of PosixFileAttributes.
*/
class UnixFileAttributes
implements PosixFileAttributes
{
private int st_mode;
private long st_ino;
private long st_dev;
private long st_rdev;
private int st_nlink;
private int st_uid;
private int st_gid;
private long st_size;
private long st_atime;
private long st_mtime;
private long st_ctime;
// created lazily
private UnixFileAttributes() {
}
// get the UnixFileAttributes for a given file
throws UnixException
{
if (followLinks) {
} else {
}
return attrs;
}
// get the UnixFileAttributes for an open file
return attrs;
}
// get the UnixFileAttributes for a given file, relative to open directory
throws UnixException
{
return attrs;
}
// package-private
}
// package-private
}
boolean isDevice() {
}
}
}
return lastModifiedTime();
}
public boolean isRegularFile() {
}
public boolean isDirectory() {
}
public boolean isSymbolicLink() {
}
public boolean isOther() {
}
public long size() {
return st_size;
}
synchronized (this) {
}
}
}
return key;
}
synchronized (this) {
}
}
}
return owner;
}
synchronized (this) {
}
}
}
return group;
}
return perms;
}
// wrap this object with BasicFileAttributes object to prevent leaking of
// user information
return UnixAsBasicFileAttributes.wrap(this);
}
// unwrap BasicFileAttributes to get the underlying UnixFileAttributes
// object. Returns null is not wrapped.
if (attrs instanceof UnixFileAttributes)
return (UnixFileAttributes)attrs;
if (attrs instanceof UnixAsBasicFileAttributes) {
}
return null;
}
// wrap a UnixFileAttributes object as a BasicFileAttributes
}
return new UnixAsBasicFileAttributes(attrs);
}
return attrs;
}
return attrs.lastModifiedTime();
}
return attrs.lastAccessTime();
}
return attrs.creationTime();
}
public boolean isRegularFile() {
return attrs.isRegularFile();
}
public boolean isDirectory() {
return attrs.isDirectory();
}
public boolean isSymbolicLink() {
return attrs.isSymbolicLink();
}
public boolean isOther() {
}
public long size() {
}
}
}
}