/***************************************************************************
                            QDir.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;

/**

 $Id: QDir.java,v 1.4 2001/11/22 00:50:27 rdale Exp $

 Definition of QFileInfo class

 Created : 950628

 Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.

 This file is part of the tools module of the Qt GUI Toolkit.

 This file may be distributed under the terms of the Q Public License
 as defined by Trolltech AS of Norway and appearing in the file
 LICENSE.QPL included in the packaging of this file.

 This file may be distributed and/or modified under the terms of the
 GNU General Public License version 2 as published by the Free Software
 Foundation and appearing in the file LICENSE.GPL included in the
 packaging of this file.

 Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
 licenses may use this file in accordance with the Qt Commercial License
 Agreement provided with the Software.

 This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

 See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
   information about Qt Commercial License Agreements.
 See http://www.trolltech.com/qpl/ for QPL licensing information.
 See http://www.trolltech.com/gpl/ for GPL licensing information.

 Contact info@trolltech.com if any conditions of this licensing are
 not clear to you.


 @short 
* $Id:  qt/qfileinfo.
*/
public class  QDir implements QtSupport {
	private long _qt;
	private boolean _allocatedInJavaWorld = true;

	protected QDir(Class dummy){}

	private native void newQDir();
	public QDir() {
		newQDir();
	}
	private native void newQDir( String path, String nameFilter, int sortSpec, int filterSpec);
	public QDir( String path, String nameFilter, int sortSpec, int filterSpec) {
		newQDir( path, nameFilter, sortSpec, filterSpec);
	}
	private native void newQDir( String path);
	public QDir( String path) {
		newQDir( path);
	}
	private native void newQDir( QDir arg1);
	public QDir( QDir arg1) {
		newQDir( arg1);
	}
	protected native void finalize() throws InternalError;
	public native void setPath( String path);
	public native String path();
	public native String absPath();
	public native String canonicalPath();
	public native String dirName();
	public native String filePath( String fileName, boolean acceptAbsPath);
	public native String absFilePath( String fileName, boolean acceptAbsPath);
	public native boolean cd( String dirName, boolean acceptAbsPath);
	public native boolean cd( String dirName);
	public native boolean cdUp();
	public native String nameFilter();
	public native void setNameFilter( String nameFilter);
	public native int filter();
	public native void setFilter( int filterSpec);
	public native int sorting();
	public native void setSorting( int sortSpec);
	public native boolean matchAllDirs();
	public native void setMatchAllDirs( boolean arg1);
	public native int count();
	public native ArrayList encodedEntryList( int filterSpec, int sortSpec);
	public native ArrayList encodedEntryList( String nameFilter, int filterSpec, int sortSpec);
	public native ArrayList entryList( int filterSpec, int sortSpec);
	public native ArrayList entryList( String nameFilter, int filterSpec, int sortSpec);
//	public native QFileInfoList entryInfoList( int filterSpec, int sortSpec);
//	public native QFileInfoList entryInfoList();
//	public native QFileInfoList entryInfoList( String nameFilter, int filterSpec, int sortSpec);
//	public native QFileInfoList entryInfoList( String nameFilter);
	public native boolean mkdir( String dirName, boolean acceptAbsPath);
	public native boolean mkdir( String dirName);
	public native boolean rmdir( String dirName, boolean acceptAbsPath);
	public native boolean rmdir( String dirName);
	public native boolean isReadable();
	public native boolean exists();
	public native boolean isRoot();
	public native boolean isRelative();
	public native void convertToAbs();
	public native boolean remove( String fileName, boolean acceptAbsPath);
	public native boolean remove( String fileName);
	public native boolean rename( String name, String newName, boolean acceptAbsPaths);
	public native boolean rename( String name, String newName);
	public native boolean exists( String name, boolean acceptAbsPath);
	public native boolean exists( String name);
	public static native String convertSeparators( String pathName);
//	public static native QFileInfoList drives();
	public static native char separator();
	public static native boolean setCurrent( String path);
	public static native QDir current();
	public static native QDir home();
	public static native QDir root();
	public static native String currentDirPath();
	public static native String homeDirPath();
	public static native String rootDirPath();
	public static native boolean match( String[] filters, String fileName);
	public static native boolean match( String filter, String fileName);
	public static native String cleanDirPath( String dirPath);
	public static native boolean isRelativePath( String path);
	public static final int Dirs = 0x001;
	public static final int Files = 0x002;
	public static final int Drives = 0x004;
	public static final int NoSymLinks = 0x008;
	public static final int All = 0x007;
	public static final int TypeMask = 0x00F;
	public static final int Readable = 0x010;
	public static final int Writable = 0x020;
	public static final int Executable = 0x040;
	public static final int RWEMask = 0x070;
	public static final int Modified = 0x080;
	public static final int Hidden = 0x100;
	public static final int System = 0x200;
	public static final int AccessMask = 0x3F0;
	public static final int DefaultFilter = -1;
	public static final int Name = 0x00;
	public static final int Time = 0x01;
	public static final int Size = 0x02;
	public static final int Unsorted = 0x03;
	public static final int SortByMask = 0x03;
	public static final int DirsFirst = 0x04;
	public static final int Reversed = 0x08;
	public static final int IgnoreCase = 0x10;
	public static final int DefaultSort = -1;
}
