All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.core.QFile Maven / Gradle / Ivy

There is a newer version: 6.8.1
Show newest version
package io.qt.core;


/**
 * 

Interface for reading from and writing to files

*

Java wrapper for Qt class QFile

*/ public class QFile extends io.qt.core.QFileDevice { /** * This variable stores the meta-object for the class. */ public static final io.qt.core.QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QFile.class); /** *

See QFile::QFile()

*/ public QFile(){ super((QPrivateConstructor)null); initialize_native(this); } private native static void initialize_native(QFile instance); /** *

See QFile::QFile(QObject*)

*/ public QFile(io.qt.core.QObject parent){ super((QPrivateConstructor)null); initialize_native(this, parent); } private native static void initialize_native(QFile instance, io.qt.core.QObject parent); /** *

See QFile::QFile(QString)

*/ public QFile(java.lang.String name){ super((QPrivateConstructor)null); initialize_native(this, name); } private native static void initialize_native(QFile instance, java.lang.String name); /** *

See QFile::QFile(QString,QObject*)

*/ public QFile(java.lang.String name, io.qt.core.QObject parent){ super((QPrivateConstructor)null); initialize_native(this, name, parent); } private native static void initialize_native(QFile instance, java.lang.String name, io.qt.core.QObject parent); /** *

See QFile::copy(QString)

*/ @io.qt.QtUninvokable public final boolean copy(java.lang.String newName){ return copy_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), newName); } @io.qt.QtUninvokable private native boolean copy_native_cref_QString(long __this__nativeId, java.lang.String newName); /** *

See QFile::exists()const

*/ @io.qt.QtUninvokable public final boolean exists(){ return exists_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native boolean exists_native_constfct(long __this__nativeId); /** *

See QFile::link(QString)

*/ @io.qt.QtUninvokable public final boolean link(java.lang.String newName){ return link_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), newName); } @io.qt.QtUninvokable private native boolean link_native_cref_QString(long __this__nativeId, java.lang.String newName); /** *

See QFile::moveToTrash()

*/ @io.qt.QtUninvokable public final boolean moveToTrash(){ return moveToTrash_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native boolean moveToTrash_native(long __this__nativeId); /** *

Overloaded function for {@link #open(int, io.qt.core.QIODeviceBase.OpenMode, io.qt.core.QFileDevice.FileHandleFlags)}.

*/ @io.qt.QtUninvokable public final boolean open(int fd, io.qt.core.QIODeviceBase.OpenMode ioFlags, io.qt.core.QFileDevice.FileHandleFlag ... handleFlags){ return open(fd, ioFlags, new io.qt.core.QFileDevice.FileHandleFlags(handleFlags)); } /** *

Overloaded function for {@link #open(int, io.qt.core.QIODeviceBase.OpenMode, io.qt.core.QFileDevice.FileHandleFlags)} * with handleFlags = new io.qt.core.QFileDevice.FileHandleFlags(0).

*/ @io.qt.QtUninvokable public final boolean open(int fd, io.qt.core.QIODeviceBase.OpenMode ioFlags) { return open(fd, ioFlags, new io.qt.core.QFileDevice.FileHandleFlags(0)); } /** *

See QFile::open(int,OpenMode,FileHandleFlags)

*/ @io.qt.QtUninvokable public final boolean open(int fd, io.qt.core.QIODeviceBase.OpenMode ioFlags, io.qt.core.QFileDevice.FileHandleFlags handleFlags){ return open_native_int_QFlags_QIODeviceBase_OpenModeFlag__QFlags_QFileDevice_FileHandleFlag_(QtJambi_LibraryUtilities.internal.nativeId(this), fd, ioFlags.value(), handleFlags.value()); } @io.qt.QtUninvokable private native boolean open_native_int_QFlags_QIODeviceBase_OpenModeFlag__QFlags_QFileDevice_FileHandleFlag_(long __this__nativeId, int fd, int ioFlags, int handleFlags); /** *

See QFile::remove()

*/ @io.qt.QtUninvokable public final boolean remove(){ return remove_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native boolean remove_native(long __this__nativeId); /** *

See QFile::rename(QString)

*/ @io.qt.QtDeclaredFinal @io.qt.QtUninvokable public boolean rename(java.lang.String newName){ return rename_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), newName); } @io.qt.QtUninvokable private native boolean rename_native_cref_QString(long __this__nativeId, java.lang.String newName); /** *

See QFile::setFileName(QString)

*/ @io.qt.QtUninvokable public final void setFileName(java.lang.String name){ setFileName_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), name); } @io.qt.QtUninvokable private native void setFileName_native_cref_QString(long __this__nativeId, java.lang.String name); /** *

See QFile::symLinkTarget()const

*/ @io.qt.QtUninvokable public final java.lang.String symLinkTarget(){ return symLinkTarget_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native java.lang.String symLinkTarget_native_constfct(long __this__nativeId); /** *

See QFileDevice::fileName()const

*/ @io.qt.QtUninvokable public java.lang.String fileName(){ return fileName_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native java.lang.String fileName_native_constfct(long __this__nativeId); /** *

See QIODevice::open(OpenMode)

*/ @io.qt.QtUninvokable public boolean open(io.qt.core.QIODeviceBase.OpenMode flags){ return open_native_QFlags_QIODeviceBase_OpenModeFlag_(QtJambi_LibraryUtilities.internal.nativeId(this), flags.value()); } @io.qt.QtUninvokable private native boolean open_native_QFlags_QIODeviceBase_OpenModeFlag_(long __this__nativeId, int flags); /** *

See QFileDevice::permissions()const

*/ @io.qt.QtUninvokable public io.qt.core.QFileDevice.Permissions permissions(){ return new io.qt.core.QFileDevice.Permissions(permissions_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int permissions_native_constfct(long __this__nativeId); /** *

See QFileDevice::resize(qint64)

*/ @io.qt.QtUninvokable public boolean resize(long sz){ return resize_native_long_long(QtJambi_LibraryUtilities.internal.nativeId(this), sz); } @io.qt.QtUninvokable private native boolean resize_native_long_long(long __this__nativeId, long sz); /** *

See QFileDevice::setPermissions(Permissions)

*/ @io.qt.QtUninvokable public boolean setPermissions(io.qt.core.QFileDevice.Permissions permissionSpec){ return setPermissions_native_QFlags_QFileDevice_Permission_(QtJambi_LibraryUtilities.internal.nativeId(this), permissionSpec.value()); } @io.qt.QtUninvokable private native boolean setPermissions_native_QFlags_QFileDevice_Permission_(long __this__nativeId, int permissionSpec); /** *

See QIODevice::size()const

*/ @io.qt.QtUninvokable public long size(){ return size_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native long size_native_constfct(long __this__nativeId); /** *

See QFile::copy(QString,QString)

*/ public native static boolean copy(java.lang.String fileName, java.lang.String newName); /** *

See QFile::decodeName(QByteArray)

*/ public static java.lang.String decodeName(io.qt.core.QByteArray localFileName){ return decodeName_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.checkedNativeId(localFileName)); } private native static java.lang.String decodeName_native_cref_QByteArray(long localFileName); public native static java.lang.String decodeName(java.lang.String localFileName); /** *

See QFile::encodeName(QString)

*/ public native static io.qt.core.QByteArray encodeName(java.lang.String fileName); /** *

See QFile::exists(QString)

*/ public native static boolean exists(java.lang.String fileName); /** *

See QFile::link(QString,QString)

*/ public native static boolean link(java.lang.String oldname, java.lang.String newName); /** *

See QFile::moveToTrash(QString,QString*)

*/ public native static io.qt.core.QFile.TrashResult moveToTrash(java.lang.String fileName); /** *

See QFile::permissions(QString)

*/ public static io.qt.core.QFileDevice.Permissions permissions(java.lang.String filename){ return new io.qt.core.QFileDevice.Permissions(permissions_native_cref_QString(filename)); } private native static int permissions_native_cref_QString(java.lang.String filename); /** *

See QFile::remove(QString)

*/ public native static boolean remove(java.lang.String fileName); /** *

See QFile::rename(QString,QString)

*/ public native static boolean rename(java.lang.String oldName, java.lang.String newName); /** *

See QFile::resize(QString,qint64)

*/ public native static boolean resize(java.lang.String filename, long sz); /** *

Overloaded function for {@link #setPermissions(java.lang.String, io.qt.core.QFileDevice.Permissions)}.

*/ public static boolean setPermissions(java.lang.String filename, io.qt.core.QFileDevice.Permission ... permissionSpec){ return setPermissions(filename, new io.qt.core.QFileDevice.Permissions(permissionSpec)); } /** *

See QFile::setPermissions(QString,Permissions)

*/ public static boolean setPermissions(java.lang.String filename, io.qt.core.QFileDevice.Permissions permissionSpec){ return setPermissions_native_cref_QString_QFlags_QFileDevice_Permission_(filename, permissionSpec.value()); } private native static boolean setPermissions_native_cref_QString_QFlags_QFileDevice_Permission_(java.lang.String filename, int permissionSpec); /** *

See QFile::symLinkTarget(QString)

*/ public native static java.lang.String symLinkTarget(java.lang.String fileName); /** * Constructor for internal use only. * @param p expected to be null. */ @io.qt.NativeAccess protected QFile(QPrivateConstructor p) { super(p); } /** * Constructor for internal use only. * It is not allowed to call the declarative constructor from inside Java. */ @io.qt.NativeAccess protected QFile(QDeclarativeConstructor constructor) { super((QPrivateConstructor)null); initialize_native(this, constructor); } @io.qt.QtUninvokable private static native void initialize_native(QFile instance, QDeclarativeConstructor constructor); /** * Result class for {@link #moveToTrash(java.lang.String)} */ public static class TrashResult{ public final boolean success; public final String pathInTrash; private TrashResult(boolean success, String pathInTrash) { super(); this.success = success; this.pathInTrash = pathInTrash; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy