io.qt.core.internal.QAbstractFileEngine Maven / Gradle / Ivy
package io.qt.core.internal;
/**
* Java wrapper for Qt class QAbstractFileEngine
*/
public class QAbstractFileEngine extends io.qt.QtObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Java wrapper for Qt enum QAbstractFileEngine::FileFlag
*
* @see FileFlags
*/
public enum FileFlag implements io.qt.QtFlagEnumerator {
ReadOwnerPerm(16384),
WriteOwnerPerm(8192),
ExeOwnerPerm(4096),
ReadUserPerm(1024),
WriteUserPerm(512),
ExeUserPerm(256),
ReadGroupPerm(64),
WriteGroupPerm(32),
ExeGroupPerm(16),
ReadOtherPerm(4),
WriteOtherPerm(2),
ExeOtherPerm(1),
LinkType(65536),
FileType(131072),
DirectoryType(262144),
BundleType(524288),
HiddenFlag(1048576),
LocalDiskFlag(2097152),
ExistsFlag(4194304),
RootFlag(8388608),
Refresh(16777216),
PermsMask(65535),
TypesMask(983040),
FlagsMask(267386880),
FileInfoAll(268435455);
private FileFlag(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public FileFlags asFlags() {
return new FileFlags(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public FileFlags combined(FileFlag e) {
return new FileFlags(this, e);
}
/**
* Creates a new {@link FileFlags} from the entries.
* @param values entries
* @return new flag
*/
public static FileFlags flags(FileFlag ... values) {
return new FileFlags(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static FileFlag resolve(int value) {
switch (value) {
case 16384: return ReadOwnerPerm;
case 8192: return WriteOwnerPerm;
case 4096: return ExeOwnerPerm;
case 1024: return ReadUserPerm;
case 512: return WriteUserPerm;
case 256: return ExeUserPerm;
case 64: return ReadGroupPerm;
case 32: return WriteGroupPerm;
case 16: return ExeGroupPerm;
case 4: return ReadOtherPerm;
case 2: return WriteOtherPerm;
case 1: return ExeOtherPerm;
case 65536: return LinkType;
case 131072: return FileType;
case 262144: return DirectoryType;
case 524288: return BundleType;
case 1048576: return HiddenFlag;
case 2097152: return LocalDiskFlag;
case 4194304: return ExistsFlag;
case 8388608: return RootFlag;
case 16777216: return Refresh;
case 65535: return PermsMask;
case 983040: return TypesMask;
case 267386880: return FlagsMask;
case 268435455: return FileInfoAll;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* QFlags type for enum {@link FileFlag}
*/
public static final class FileFlags extends io.qt.QFlags implements Comparable {
private static final long serialVersionUID = 0x9b0008f5012c2a80L;
/**
* Creates a new FileFlags where the flags in args
are set.
* @param args enum entries
*/
public FileFlags(FileFlag ... args){
super(args);
}
/**
* Creates a new FileFlags with given value
.
* @param value
*/
public FileFlags(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new FileFlags
*/
@Override
public final FileFlags combined(FileFlag e){
return new FileFlags(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final FileFlags setFlag(FileFlag e){
super.setFlag(e);
return this;
}
/**
* Sets or clears the flag flag
* @param e enum entry
* @param on set (true) or clear (false)
* @return this
*/
public final FileFlags setFlag(FileFlag e, boolean on){
super.setFlag(e, on);
return this;
}
/**
* Returns an array of flag objects represented by this FileFlags.
* @return array of enum entries
*/
@Override
public final FileFlag[] flags(){
return super.flags(FileFlag.values());
}
/**
* {@inheritDoc}
*/
@Override
public final FileFlags clone(){
return new FileFlags(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(FileFlags other){
return Integer.compare(value(), other.value());
}
}
/**
* Java wrapper for Qt enum QAbstractFileEngine::FileName
*/
public enum FileName implements io.qt.QtEnumerator {
DefaultName(0),
BaseName(1),
PathName(2),
AbsoluteName(3),
AbsolutePathName(4),
AbsoluteLinkTarget(5),
CanonicalName(6),
CanonicalPathName(7),
BundleName(8),
JunctionName(9),
NFileNames(10);
private FileName(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static FileName resolve(int value) {
switch (value) {
case 0: return DefaultName;
case 1: return BaseName;
case 2: return PathName;
case 3: return AbsoluteName;
case 4: return AbsolutePathName;
case 5: return AbsoluteLinkTarget;
case 6: return CanonicalName;
case 7: return CanonicalPathName;
case 8: return BundleName;
case 9: return JunctionName;
case 10: return NFileNames;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QAbstractFileEngine::FileOwner
*/
public enum FileOwner implements io.qt.QtEnumerator {
OwnerUser(0),
OwnerGroup(1);
private FileOwner(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static FileOwner resolve(int value) {
switch (value) {
case 0: return OwnerUser;
case 1: return OwnerGroup;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QAbstractFileEngine::FileTime
*/
public enum FileTime implements io.qt.QtEnumerator {
AccessTime(0),
BirthTime(1),
MetadataChangeTime(2),
ModificationTime(3);
private FileTime(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static FileTime resolve(int value) {
switch (value) {
case 0: return AccessTime;
case 1: return BirthTime;
case 2: return MetadataChangeTime;
case 3: return ModificationTime;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
protected QAbstractFileEngine(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QAbstractFileEngine instance);
@io.qt.QtUninvokable
public final boolean atEnd(){
return atEnd_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean atEnd_native_constfct(long __this__nativeId);
@io.qt.QtUninvokable
public final io.qt.core.QFileDevice.FileError error(){
return io.qt.core.QFileDevice.FileError.resolve(error_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int error_native_constfct(long __this__nativeId);
@io.qt.QtUninvokable
public final java.lang.String errorString(){
return errorString_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native java.lang.String errorString_native_constfct(long __this__nativeId);
/**
* Overloaded function for {@link #map(long, long, io.qt.core.QFileDevice.MemoryMapFlags)}.
*/
@io.qt.QtUninvokable
public final java.nio.ByteBuffer map(long offset, long size, io.qt.core.QFileDevice.MemoryMapFlag ... flags){
return map(offset, size, new io.qt.core.QFileDevice.MemoryMapFlags(flags));
}
@io.qt.QtUninvokable
public final java.nio.ByteBuffer map(long offset, long size, io.qt.core.QFileDevice.MemoryMapFlags flags){
return map_native_long_long_long_long_QFlags_QFileDevice_MemoryMapFlag_(QtJambi_LibraryUtilities.internal.nativeId(this), offset, size, flags.value());
}
@io.qt.QtUninvokable
private native java.nio.ByteBuffer map_native_long_long_long_long_QFlags_QFileDevice_MemoryMapFlag_(long __this__nativeId, long offset, long size, int flags);
@io.qt.QtUninvokable
protected final void setError(io.qt.core.QFileDevice.FileError error, java.lang.String str){
setError_native_QFileDevice_FileError_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), error.value(), str);
}
@io.qt.QtUninvokable
private native void setError_native_QFileDevice_FileError_cref_QString(long __this__nativeId, int error, java.lang.String str);
@io.qt.QtUninvokable
public final boolean unmap(java.nio.ByteBuffer ptr){
return unmap_native_unsigned_char_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), ptr);
}
@io.qt.QtUninvokable
private native boolean unmap_native_unsigned_char_ptr(long __this__nativeId, java.nio.ByteBuffer ptr);
@io.qt.QtUninvokable
public io.qt.core.internal.QAbstractFileEngineIterator beginEntryList(io.qt.core.QDir.Filters filters, java.util.Collection filterNames){
return beginEntryList_native_QFlags_QDir_Filter__cref_QStringList(QtJambi_LibraryUtilities.internal.nativeId(this), filters.value(), filterNames);
}
@io.qt.QtUninvokable
private native io.qt.core.internal.QAbstractFileEngineIterator beginEntryList_native_QFlags_QDir_Filter__cref_QStringList(long __this__nativeId, int filters, java.util.Collection filterNames);
@io.qt.QtUninvokable
public boolean caseSensitive(){
return caseSensitive_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean caseSensitive_native_constfct(long __this__nativeId);
@io.qt.QtUninvokable
public boolean cloneTo(io.qt.core.internal.QAbstractFileEngine target){
return cloneTo_native_QAbstractFileEngine_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(target));
}
@io.qt.QtUninvokable
private native boolean cloneTo_native_QAbstractFileEngine_ptr(long __this__nativeId, long target);
@io.qt.QtUninvokable
public boolean close(){
return close_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean close_native(long __this__nativeId);
@io.qt.QtUninvokable
public 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);
@io.qt.QtUninvokable
public io.qt.core.internal.QAbstractFileEngineIterator endEntryList(){
return endEntryList_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.internal.QAbstractFileEngineIterator endEntryList_native(long __this__nativeId);
@io.qt.QtUninvokable
public java.util.List entryList(io.qt.core.QDir.Filters filters, java.util.Collection filterNames){
return entryList_native_QFlags_QDir_Filter__cref_QStringList_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), filters.value(), filterNames);
}
@io.qt.QtUninvokable
private native java.util.List entryList_native_QFlags_QDir_Filter__cref_QStringList_constfct(long __this__nativeId, int filters, java.util.Collection filterNames);
/**
* Overloaded function for {@link #fileFlags(io.qt.core.internal.QAbstractFileEngine.FileFlags)}.
*/
@io.qt.QtUninvokable
public final io.qt.core.internal.QAbstractFileEngine.FileFlags fileFlags(io.qt.core.internal.QAbstractFileEngine.FileFlag ... type){
return fileFlags(new io.qt.core.internal.QAbstractFileEngine.FileFlags(type));
}
/**
* Overloaded function for {@link #fileFlags(io.qt.core.internal.QAbstractFileEngine.FileFlags)}
* with type = new io.qt.core.internal.QAbstractFileEngine.FileFlags(268435455)
.
*/
@io.qt.QtUninvokable
public final io.qt.core.internal.QAbstractFileEngine.FileFlags fileFlags() {
return fileFlags(new io.qt.core.internal.QAbstractFileEngine.FileFlags(268435455));
}
@io.qt.QtUninvokable
public io.qt.core.internal.QAbstractFileEngine.FileFlags fileFlags(io.qt.core.internal.QAbstractFileEngine.FileFlags type){
return new io.qt.core.internal.QAbstractFileEngine.FileFlags(fileFlags_native_QFlags_QAbstractFileEngine_FileFlag__constfct(QtJambi_LibraryUtilities.internal.nativeId(this), type.value()));
}
@io.qt.QtUninvokable
private native int fileFlags_native_QFlags_QAbstractFileEngine_FileFlag__constfct(long __this__nativeId, int type);
/**
* Overloaded function for {@link #fileName(io.qt.core.internal.QAbstractFileEngine.FileName)}
* with file = io.qt.core.internal.QAbstractFileEngine.FileName.DefaultName
.
*/
@io.qt.QtUninvokable
public final java.lang.String fileName() {
return fileName(io.qt.core.internal.QAbstractFileEngine.FileName.DefaultName);
}
@io.qt.QtUninvokable
public java.lang.String fileName(io.qt.core.internal.QAbstractFileEngine.FileName file){
return fileName_native_QAbstractFileEngine_FileName_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), file.value());
}
@io.qt.QtUninvokable
private native java.lang.String fileName_native_QAbstractFileEngine_FileName_constfct(long __this__nativeId, int file);
@io.qt.QtUninvokable
public io.qt.core.QDateTime fileTime(io.qt.core.internal.QAbstractFileEngine.FileTime time){
return fileTime_native_QAbstractFileEngine_FileTime_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), time.value());
}
@io.qt.QtUninvokable
private native io.qt.core.QDateTime fileTime_native_QAbstractFileEngine_FileTime_constfct(long __this__nativeId, int time);
@io.qt.QtUninvokable
public boolean flush(){
return flush_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean flush_native(long __this__nativeId);
@io.qt.QtUninvokable
public int handle(){
return handle_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int handle_native_constfct(long __this__nativeId);
@io.qt.QtUninvokable
public io.qt.core.QByteArray id(){
return id_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QByteArray id_native_constfct(long __this__nativeId);
@io.qt.QtUninvokable
public boolean isRelativePath(){
return isRelativePath_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean isRelativePath_native_constfct(long __this__nativeId);
@io.qt.QtUninvokable
public boolean isSequential(){
return isSequential_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean isSequential_native_constfct(long __this__nativeId);
@io.qt.QtUninvokable
public 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);
/**
* Overloaded function for {@link #mkdir(java.lang.String, boolean, java.util.Optional)}
* with permissions = java.util.Optional.empty()
.
*/
@io.qt.QtUninvokable
public final boolean mkdir(java.lang.String dirName, boolean createParentDirectories) {
return mkdir(dirName, createParentDirectories, java.util.Optional.empty());
}
@io.qt.QtUninvokable
public boolean mkdir(java.lang.String dirName, boolean createParentDirectories, java.util.Optional permissions){
return mkdir_native_cref_QString_bool_std_optional_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), dirName, createParentDirectories, permissions);
}
@io.qt.QtUninvokable
private native boolean mkdir_native_cref_QString_bool_std_optional_constfct(long __this__nativeId, java.lang.String dirName, boolean createParentDirectories, java.util.Optional permissions);
/**
* Overloaded function for {@link #open(io.qt.core.QIODeviceBase.OpenMode, java.util.Optional)}
* with permissions = java.util.Optional.empty()
.
*/
@io.qt.QtUninvokable
public final boolean open(io.qt.core.QIODeviceBase.OpenMode openMode) {
return open(openMode, java.util.Optional.empty());
}
@io.qt.QtUninvokable
public boolean open(io.qt.core.QIODeviceBase.OpenMode openMode, java.util.Optional permissions){
return open_native_QFlags_QIODeviceBase_OpenModeFlag__std_optional(QtJambi_LibraryUtilities.internal.nativeId(this), openMode.value(), permissions);
}
@io.qt.QtUninvokable
private native boolean open_native_QFlags_QIODeviceBase_OpenModeFlag__std_optional(long __this__nativeId, int openMode, java.util.Optional permissions);
@io.qt.QtUninvokable
public java.lang.String owner(io.qt.core.internal.QAbstractFileEngine.FileOwner arg__1){
return owner_native_QAbstractFileEngine_FileOwner_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1.value());
}
@io.qt.QtUninvokable
private native java.lang.String owner_native_QAbstractFileEngine_FileOwner_constfct(long __this__nativeId, int arg__1);
@io.qt.QtUninvokable
public int ownerId(io.qt.core.internal.QAbstractFileEngine.FileOwner arg__1){
return ownerId_native_QAbstractFileEngine_FileOwner_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1.value());
}
@io.qt.QtUninvokable
private native int ownerId_native_QAbstractFileEngine_FileOwner_constfct(long __this__nativeId, int arg__1);
@io.qt.QtUninvokable
public long pos(){
return pos_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native long pos_native_constfct(long __this__nativeId);
@io.qt.QtUninvokable
public int read(byte[] data){
return read_native_char_ptr_long_long(QtJambi_LibraryUtilities.internal.nativeId(this), data);
}
@io.qt.QtUninvokable
private native int read_native_char_ptr_long_long(long __this__nativeId, byte[] data);
@io.qt.QtUninvokable
public int readLine(byte[] data){
return readLine_native_char_ptr_long_long(QtJambi_LibraryUtilities.internal.nativeId(this), data);
}
@io.qt.QtUninvokable
private native int readLine_native_char_ptr_long_long(long __this__nativeId, byte[] data);
@io.qt.QtUninvokable
public boolean remove(){
return remove_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean remove_native(long __this__nativeId);
@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);
@io.qt.QtUninvokable
public boolean renameOverwrite(java.lang.String newName){
return renameOverwrite_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), newName);
}
@io.qt.QtUninvokable
private native boolean renameOverwrite_native_cref_QString(long __this__nativeId, java.lang.String newName);
@io.qt.QtUninvokable
public boolean rmdir(java.lang.String dirName, boolean recurseParentDirectories){
return rmdir_native_cref_QString_bool_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), dirName, recurseParentDirectories);
}
@io.qt.QtUninvokable
private native boolean rmdir_native_cref_QString_bool_constfct(long __this__nativeId, java.lang.String dirName, boolean recurseParentDirectories);
@io.qt.QtUninvokable
public boolean seek(long pos){
return seek_native_long_long(QtJambi_LibraryUtilities.internal.nativeId(this), pos);
}
@io.qt.QtUninvokable
private native boolean seek_native_long_long(long __this__nativeId, long pos);
@io.qt.QtUninvokable
public void setFileName(java.lang.String file){
setFileName_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), file);
}
@io.qt.QtUninvokable
private native void setFileName_native_cref_QString(long __this__nativeId, java.lang.String file);
@io.qt.QtUninvokable
public boolean setFileTime(io.qt.core.QDateTime newDate, io.qt.core.internal.QAbstractFileEngine.FileTime time){
return setFileTime_native_cref_QDateTime_QAbstractFileEngine_FileTime(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(newDate), time.value());
}
@io.qt.QtUninvokable
private native boolean setFileTime_native_cref_QDateTime_QAbstractFileEngine_FileTime(long __this__nativeId, long newDate, int time);
@io.qt.QtUninvokable
public boolean setPermissions(int perms){
return setPermissions_native_uint(QtJambi_LibraryUtilities.internal.nativeId(this), perms);
}
@io.qt.QtUninvokable
private native boolean setPermissions_native_uint(long __this__nativeId, int perms);
@io.qt.QtUninvokable
public boolean setSize(long size){
return setSize_native_long_long(QtJambi_LibraryUtilities.internal.nativeId(this), size);
}
@io.qt.QtUninvokable
private native boolean setSize_native_long_long(long __this__nativeId, long size);
@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);
@io.qt.QtUninvokable
public boolean syncToDisk(){
return syncToDisk_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean syncToDisk_native(long __this__nativeId);
@io.qt.QtUninvokable
public int write(byte[] data){
return write_native_const_char_ptr_long_long(QtJambi_LibraryUtilities.internal.nativeId(this), data);
}
@io.qt.QtUninvokable
private native int write_native_const_char_ptr_long_long(long __this__nativeId, byte[] data);
public native static io.qt.core.internal.QAbstractFileEngine create(java.lang.String fileName);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QAbstractFileEngine(QPrivateConstructor p) { super(p); }
}