Qyoto  4.0.7
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties
QtCore.QFSFileEngine Class Reference

The QFSFileEngine class implements Qt's default file engine. More...

Inheritance diagram for QtCore.QFSFileEngine:
Collaboration diagram for QtCore.QFSFileEngine:

Public Member Functions

 QFSFileEngine ()
  More...
 
 QFSFileEngine (string file)
  More...
 
override void CreateProxy ()
 
override
QAbstractFileEngineIterator 
BeginEntryList (QDir.Filter filters, System.Collections.Generic.List< string > filterNames)
  More...
 
override bool Close ()
  More...
 
override bool Copy (string newName)
  More...
 
override
QAbstractFileEngineIterator 
EndEntryList ()
 
override
System.Collections.Generic.List
< string > 
EntryList (QDir.Filter filters, System.Collections.Generic.List< string > filterNames)
  More...
 
override bool extension (QAbstractFileEngine.Extension extension, QAbstractFileEngine.ExtensionOption option=null, QAbstractFileEngine.ExtensionReturn output=null)
  More...
 
override
QAbstractFileEngine.FileFlag 
FileFlags (QAbstractFileEngine.FileFlag type)
  More...
 
override string fileName (QAbstractFileEngine.FileName file)
  More...
 
override QDateTime fileTime (QAbstractFileEngine.FileTime time)
  More...
 
override bool Link (string newName)
  More...
 
override bool Mkdir (string dirName, bool createParentDirectories)
  More...
 
override bool Open (QIODevice.OpenModeFlag openMode)
  More...
 
new bool Open (QIODevice.OpenModeFlag flags, int fd)
  More...
 
new bool Open (QIODevice.OpenModeFlag flags, int fd, QFile.FileHandleFlag handleFlags)
  More...
 
override string Owner (QAbstractFileEngine.FileOwner own)
  More...
 
override uint OwnerId (QAbstractFileEngine.FileOwner own)
  More...
 
override long Read (Pointer< sbyte > data, long maxlen)
  More...
 
override long ReadLine (Pointer< sbyte > data, long maxlen)
  More...
 
override bool Rename (string newName)
  More...
 
override bool Rmdir (string dirName, bool recurseParentDirectories)
  More...
 
override bool Seek (long pos)
  More...
 
override void SetFileName (string file)
  More...
 
override bool SetPermissions (uint perms)
  More...
 
override bool SetSize (long size)
  More...
 
override bool SupportsExtension (QAbstractFileEngine.Extension extension)
  More...
 
override long Write (string data, long len)
  More...
 
new void Dispose ()
 
- Public Member Functions inherited from QtCore.QAbstractFileEngine
new Pointer< byte > Map (long offset, long size, QFile.MemoryMapFlags flags)
  More...
 
new bool Unmap (Pointer< byte > ptr)
  More...
 
new void Dispose ()
 

Static Public Member Functions

static string CurrentPath (string path="")
  More...
 
static bool SetCurrentPath (string path)
  More...
 
- Static Public Member Functions inherited from QtCore.QAbstractFileEngine
static QAbstractFileEngine Create (string fileName)
  More...
 

Protected Member Functions

 QFSFileEngine (System.Type dummy)
 
- Protected Member Functions inherited from QtCore.QAbstractFileEngine
 QAbstractFileEngine (System.Type dummy)
 
 QAbstractFileEngine ()
  More...
 
new void SetError (QFile.FileError error, string str)
  More...
 

Properties

override bool CaseSensitive [get]
  More...
 
override bool Flush [get]
  More...
 
override int Handle [get]
  More...
 
override bool IsRelativePath [get]
  More...
 
override bool IsSequential [get]
  More...
 
override long Pos [get]
  More...
 
override bool Remove [get]
  More...
 
override long Size [get]
  More...
 
static
System.Collections.Generic.List
< QFileInfo
Drives [get]
  More...
 
static string HomePath [get]
  More...
 
static string RootPath [get]
  More...
 
static string TempPath [get]
  More...
 
- Properties inherited from QtCore.QAbstractFileEngine
QFile.FileError Error [get]
  More...
 
bool AtEnd [get]
  More...
 
virtual bool CaseSensitive [get]
  More...
 
string ErrorString [get]
  More...
 
virtual bool Flush [get]
  More...
 
virtual int Handle [get]
  More...
 
virtual bool IsRelativePath [get]
  More...
 
virtual bool IsSequential [get]
  More...
 
virtual long Pos [get]
  More...
 
virtual bool Remove [get]
  More...
 
virtual long Size [get]
  More...
 
virtual System.IntPtr SmokeObject [get, set]
 

Additional Inherited Members

- Public Types inherited from QtCore.QAbstractFileEngine
enum  Extension { AtEndExtension = 0, FastReadLineExtension = 1, MapExtension = 2, UnMapExtension = 3 }
  More...
 
enum  FileFlag {
  BundleType = 524288, DirectoryType = 262144, ExeGroupPerm = 16, ExeOtherPerm = 1,
  ExeOwnerPerm = 4096, ExeUserPerm = 256, ExistsFlag = 4194304, FileInfoAll = 268435455,
  FileType = 131072, FlagsMask = 267386880, HiddenFlag = 1048576, LinkType = 65536,
  LocalDiskFlag = 2097152, PermsMask = 65535, ReadGroupPerm = 64, ReadOtherPerm = 4,
  ReadOwnerPerm = 16384, ReadUserPerm = 1024, Refresh = 16777216, RootFlag = 8388608,
  TypesMask = 983040, WriteGroupPerm = 32, WriteOtherPerm = 2, WriteOwnerPerm = 8192,
  WriteUserPerm = 512
}
  More...
 
enum  FileName {
  AbsoluteName = 3, AbsolutePathName = 4, BaseName = 1, BundleName = 8,
  CanonicalName = 6, CanonicalPathName = 7, DefaultName = 0, LinkName = 5,
  NFileNames = 9, PathName = 2
}
  More...
 
enum  FileOwner { OwnerGroup = 1, OwnerUser = 0 }
  More...
 
enum  FileTime { AccessTime = 2, CreationTime = 0, ModificationTime = 1 }
  More...
 
- Protected Attributes inherited from QtCore.QAbstractFileEngine
SmokeInvocation interceptor
 

Detailed Description

The QFSFileEngine class implements Qt's default file engine.

This class is part of the file engine framework in Qt. If you only want to access files or directories, use QFile, QFileInfo or QDir instead.

QFSFileEngine is the default file engine for accessing regular files. It is provided for convenience; by subclassing this class, you can alter its behavior slightly, without having to write a complete QAbstractFileEngine subclass. To install your custom file engine, you must also subclass QAbstractFileEngineHandler and create an instance of your handler.

It can also be useful to create a QFSFileEngine object directly if you need to use the local file system inside QAbstractFileEngine::create(), in order to avoid recursion (as higher-level classes tend to call QAbstractFileEngine::create()).

Constructor & Destructor Documentation

QtCore.QFSFileEngine.QFSFileEngine ( System.Type  dummy)
protected
QtCore.QFSFileEngine.QFSFileEngine ( )

Constructs a QFSFileEngine.

Here is the call graph for this function:

QtCore.QFSFileEngine.QFSFileEngine ( string  file)

Constructs a QFSFileEngine for the file name file.

Here is the call graph for this function:

Member Function Documentation

override QAbstractFileEngineIterator QtCore.QFSFileEngine.BeginEntryList ( QDir.Filter  filters,
System.Collections.Generic.List< string >  filterNames 
)
virtual

Returns an instance of a QAbstractFileEngineIterator using filters for entry filtering and filterNames for name filtering. This function is called by QDirIterator to initiate directory iteration.

QDirIterator takes ownership of the returned instance, and deletes it when it's done.

See also QDirIterator.

Reimplemented from QtCore.QAbstractFileEngine.

override bool QtCore.QFSFileEngine.Close ( )
virtual

Reimplemented from QAbstractFileEngine::close().

Reimplemented from QtCore.QAbstractFileEngine.

override bool QtCore.QFSFileEngine.Copy ( string  newName)
virtual

Reimplemented from QAbstractFileEngine::copy().

For windows, copy the file to file copyName.

Not implemented for Unix.

Reimplemented from QtCore.QAbstractFileEngine.

override void QtCore.QFSFileEngine.CreateProxy ( )
virtual

Reimplemented from QtCore.QAbstractFileEngine.

Here is the caller graph for this function:

static string QtCore.QFSFileEngine.CurrentPath ( string  path = "")
static

For Unix, returns the current working directory for the file engine.

For Windows, returns the canonicalized form of the current path used by the file engine for the drive specified by fileName. On Windows, each drive has its own current directory, so a different path is returned for file names that include different drive names (e.g. A: or C:).

See also setCurrentPath().

new void QtCore.QFSFileEngine.Dispose ( )
override QAbstractFileEngineIterator QtCore.QFSFileEngine.EndEntryList ( )
virtual

Reimplemented from QtCore.QAbstractFileEngine.

override System.Collections.Generic.List<string> QtCore.QFSFileEngine.EntryList ( QDir.Filter  filters,
System.Collections.Generic.List< string >  filterNames 
)
virtual

Requests that a list of all the files matching the filters list based on the filterNames in the file engine's directory are returned.

Should return an empty list if the file engine refers to a file rather than a directory, or if the directory is unreadable or does not exist or if nothing matches the specifications.

This virtual function must be reimplemented by all subclasses.

See also setFileName().

Reimplemented from QtCore.QAbstractFileEngine.

override bool QtCore.QFSFileEngine.extension ( QAbstractFileEngine.Extension  extension,
QAbstractFileEngine.ExtensionOption  option = null,
QAbstractFileEngine.ExtensionReturn  output = null 
)
virtual

Reimplemented from QAbstractFileEngine::extension().

Reimplemented from QtCore.QAbstractFileEngine.

Here is the caller graph for this function:

override QAbstractFileEngine.FileFlag QtCore.QFSFileEngine.FileFlags ( QAbstractFileEngine.FileFlag  type)
virtual

Reimplemented from QAbstractFileEngine::fileFlags().

Reimplemented from QtCore.QAbstractFileEngine.

override string QtCore.QFSFileEngine.fileName ( QAbstractFileEngine.FileName  file)
virtual

Reimplemented from QAbstractFileEngine::fileName().

See also setFileName().

Reimplemented from QtCore.QAbstractFileEngine.

override QDateTime QtCore.QFSFileEngine.fileTime ( QAbstractFileEngine.FileTime  time)
virtual

Reimplemented from QAbstractFileEngine::fileTime().

Reimplemented from QtCore.QAbstractFileEngine.

override bool QtCore.QFSFileEngine.Link ( string  newName)
virtual

Reimplemented from QAbstractFileEngine::link().

Creates a link from the file currently specified by fileName() to newName. What a link is depends on the underlying filesystem (be it a shortcut on Windows or a symbolic link on Unix). Returns true if successful; otherwise returns false.

Reimplemented from QtCore.QAbstractFileEngine.

override bool QtCore.QFSFileEngine.Mkdir ( string  dirName,
bool  createParentDirectories 
)
virtual

Reimplemented from QAbstractFileEngine::mkdir().

Reimplemented from QtCore.QAbstractFileEngine.

override bool QtCore.QFSFileEngine.Open ( QIODevice.OpenModeFlag  openMode)
virtual

Reimplemented from QAbstractFileEngine::open().

Reimplemented from QtCore.QAbstractFileEngine.

new bool QtCore.QFSFileEngine.Open ( QIODevice.OpenModeFlag  flags,
int  fd 
)

Opens the file descriptor fd in openMode mode. Returns true on success; otherwise returns false.

new bool QtCore.QFSFileEngine.Open ( QIODevice.OpenModeFlag  flags,
int  fd,
QFile.FileHandleFlag  handleFlags 
)

Opens the file descriptor fd in openMode mode. Returns true on success; otherwise returns false.

The handleFlags argument specifies whether the file handle will be closed by Qt. See the QFile::FileHandleFlags documentation for more information.

override string QtCore.QFSFileEngine.Owner ( QAbstractFileEngine.FileOwner  own)
virtual

Reimplemented from QAbstractFileEngine::owner().

Reimplemented from QtCore.QAbstractFileEngine.

override uint QtCore.QFSFileEngine.OwnerId ( QAbstractFileEngine.FileOwner  own)
virtual

Reimplemented from QAbstractFileEngine::ownerId().

In Unix, if stat() is successful, the uid is returned if own is the owner. Otherwise the gid is returned. If stat() is unsuccessful, -2 is reuturned.

For Windows, -2 is always returned.

Reimplemented from QtCore.QAbstractFileEngine.

override long QtCore.QFSFileEngine.Read ( Pointer< sbyte >  data,
long  maxlen 
)
virtual

Reimplemented from QAbstractFileEngine::read().

Reimplemented from QtCore.QAbstractFileEngine.

override long QtCore.QFSFileEngine.ReadLine ( Pointer< sbyte >  data,
long  maxlen 
)
virtual

Reimplemented from QAbstractFileEngine::readLine().

Reimplemented from QtCore.QAbstractFileEngine.

override bool QtCore.QFSFileEngine.Rename ( string  newName)
virtual

Reimplemented from QAbstractFileEngine::rename().

Reimplemented from QtCore.QAbstractFileEngine.

override bool QtCore.QFSFileEngine.Rmdir ( string  dirName,
bool  recurseParentDirectories 
)
virtual

Reimplemented from QAbstractFileEngine::rmdir().

Reimplemented from QtCore.QAbstractFileEngine.

override bool QtCore.QFSFileEngine.Seek ( long  pos)
virtual

Reimplemented from QAbstractFileEngine::seek().

Reimplemented from QtCore.QAbstractFileEngine.

static bool QtCore.QFSFileEngine.SetCurrentPath ( string  path)
static

Sets the current path (e.g., for QDir), to path. Returns true if the new path exists; otherwise this function does nothing, and returns false.

See also currentPath().

override void QtCore.QFSFileEngine.SetFileName ( string  file)
virtual

Reimplemented from QAbstractFileEngine::setFileName().

See also fileName().

Reimplemented from QtCore.QAbstractFileEngine.

override bool QtCore.QFSFileEngine.SetPermissions ( uint  perms)
virtual

Reimplemented from QAbstractFileEngine::setPermissions().

Reimplemented from QtCore.QAbstractFileEngine.

override bool QtCore.QFSFileEngine.SetSize ( long  size)
virtual

Reimplemented from QAbstractFileEngine::setSize().

See also size().

Reimplemented from QtCore.QAbstractFileEngine.

override bool QtCore.QFSFileEngine.SupportsExtension ( QAbstractFileEngine.Extension  extension)
virtual

Reimplemented from QAbstractFileEngine::supportsExtension().

Reimplemented from QtCore.QAbstractFileEngine.

Here is the call graph for this function:

override long QtCore.QFSFileEngine.Write ( string  data,
long  len 
)
virtual

Reimplemented from QAbstractFileEngine::write().

Reimplemented from QtCore.QAbstractFileEngine.

Property Documentation

override bool QtCore.QFSFileEngine.CaseSensitive
get

Reimplemented from QAbstractFileEngine::caseSensitive().

Returns true for Windows, false for Unix.

System.Collections.Generic.List<QFileInfo> QtCore.QFSFileEngine.Drives
staticget

For Windows, returns the list of drives in the file system as a list of QFileInfo objects. On unix, Mac OS X and Windows CE, only the root path is returned. On Windows, this function returns all drives (A:, C:, D:, etc.).

For Unix, the list contains just the root path "/".

override bool QtCore.QFSFileEngine.Flush
get

Reimplemented from QAbstractFileEngine::flush().

override int QtCore.QFSFileEngine.Handle
get

Reimplemented from QAbstractFileEngine::handle().

string QtCore.QFSFileEngine.HomePath
staticget

Returns the home path of the current user.

See also rootPath().

override bool QtCore.QFSFileEngine.IsRelativePath
get

Reimplemented from QAbstractFileEngine::isRelativePath().

override bool QtCore.QFSFileEngine.IsSequential
get

Reimplemented from QAbstractFileEngine::isSequential().

override long QtCore.QFSFileEngine.Pos
get

Reimplemented from QAbstractFileEngine::pos().

override bool QtCore.QFSFileEngine.Remove
getremove

Reimplemented from QAbstractFileEngine::remove().

string QtCore.QFSFileEngine.RootPath
staticget

Returns the root path.

See also homePath().

override long QtCore.QFSFileEngine.Size
get

Reimplemented from QAbstractFileEngine::size().

See also setSize().

string QtCore.QFSFileEngine.TempPath
staticget

Returns the temporary path (i.e., a path in which it is safe to store temporary files).