/***************************************************************************
                            QFileInfo.java -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 17:05:56 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

package org.kde.qt;

import java.util.*;
import java.lang.Error;

public class  QFileInfo implements QtSupport {
	private long _qt;
	private boolean _allocatedInJavaWorld = true;

	protected QFileInfo(Class dummy){}

	private native void newQFileInfo();
	public QFileInfo() {
		newQFileInfo();
	}
	private native void newQFileInfo( String file);
	public QFileInfo( String file) {
		newQFileInfo( file);
	}
	private native void newQFileInfo( QFile arg1);
	public QFileInfo( QFile arg1) {
		newQFileInfo( arg1);
	}
	private native void newQFileInfo( QDir arg1, String fileName);
	public QFileInfo( QDir arg1, String fileName) {
		newQFileInfo( arg1, fileName);
	}
	private native void newQFileInfo( QFileInfo arg1);
	public QFileInfo( QFileInfo arg1) {
		newQFileInfo( arg1);
	}
	protected native void finalize() throws InternalError;
	public native void setFile( String file);
	public native void setFile( QFile arg1);
	public native void setFile( QDir arg1, String fileName);
	public native boolean exists();
	public native void refresh();
	public native boolean caching();
	public native void setCaching( boolean arg1);
	public native String filePath();
	public native String fileName();
	public native String absFilePath();
	public native String baseName( boolean complete);
	public native String extension( boolean complete);

	public String extension() {
		return extension(true);
	}

	public native String dirPath( boolean absPath);

	public String dirPath() {
		return dirPath(false);
	}

	public native QDir dir( boolean absPath);
	public native QDir dir();
	public native boolean isReadable();
	public native boolean isWritable();
	public native boolean isExecutable();
	public native boolean isRelative();
	public native boolean convertToAbs();
	public native boolean isFile();
	public native boolean isDir();
	public native boolean isSymLink();
	public native String readLink();
	public native String owner();
	public native int ownerId();
	public native String group();
	public native int groupId();
	public native boolean permission( int permissionSpec);
	public native int size();
	public native Calendar created();
	public native Calendar lastModified();
	public native Calendar lastRead();
	public static final int ReadUser = 0400;
	public static final int WriteUser = 0200;
	public static final int ExeUser = 0100;
	public static final int ReadGroup = 0040;
	public static final int WriteGroup = 0020;
	public static final int ExeGroup = 0010;
	public static final int ReadOther = 0004;
	public static final int WriteOther = 0002;
	public static final int ExeOther = 0001;
}
