GeFile

Detailed Description

Groups

 GE_FCOPY
 
 GE_FILE_ATTRIBUTE
 
 GE_FKILL
 

Functions

Bool GeFExist (const Filename &name, Bool isdir=false)
 
Bool GeSearchFile (const Filename &directory, const Filename &name, Filename *found)
 
Bool GeFKill (const Filename &name, Int32 flags=0)
 
Bool GeFCopyFile (const Filename &source, const Filename &dest, Int32 flags)
 
Bool GeFRename (const Filename &source, const Filename &dest)
 
Bool GeFMove (const Filename &source, const Filename &dest)
 
Bool GeFCreateDir (const Filename &name)
 
Bool GeFCreateDirRec (const Filename &name)
 
Bool GeFGetDiskFreeSpace (const Filename &vol, UInt64 &freecaller, UInt64 &total, UInt64 &freespace)
 
UInt32 GeFGetAttributes (const Filename &name)
 
Bool GeFSetAttributes (const Filename &name, UInt32 flags, UInt32 mask=(UInt32) - 1)
 

Function Documentation

◆ GeFExist()

Bool GeFExist ( const Filename name,
Bool  isdir = false 
)

Checks if a file or directory exists.

Parameters
[in]nameThe name of the file or directory to check for.
[in]isdirtrue if checking a directory.
Returns
true if the file or directory exists, otherwise false.

◆ GeSearchFile()

Bool GeSearchFile ( const Filename directory,
const Filename name,
Filename found 
)

Recursively searches for a file in a given directory.

Parameters
[in]directoryThe directory to search for the file.
[in]nameThe name of the file to find.
[out]foundA pointer to a Filename to take the filename of the actual file found. The caller owns the pointed filename.
Returns
true if the file was found, otherwise false.

◆ GeFKill()

Bool GeFKill ( const Filename name,
Int32  flags = 0 
)

Deletes a file or directory.

Parameters
[in]nameThe name of the file or directory to delete.
[in]flagsThe delete flags: GE_FKILL
Returns
true if the file or directory was deleted, otherwise false.

◆ GeFCopyFile()

Bool GeFCopyFile ( const Filename source,
const Filename dest,
Int32  flags 
)

Copies a file.

Parameters
[in]sourceThe name of the file to copy.
[in]destThe name of the file to create from the source file.
[in]flagsThe copy flags: GE_FCOPY
Returns
true if the file was copied, otherwise false.

◆ GeFRename()

Bool GeFRename ( const Filename source,
const Filename dest 
)

Renames a file.

Warning
Files can only be renamed on the same directory level, i.e. they cannot be moved through this function.
Parameters
[in]sourceThe name of the file to rename.
[in]destThe new name of the file.
Returns
true if the file was renamed, otherwise false.

◆ GeFMove()

Bool GeFMove ( const Filename source,
const Filename dest 
)

Moves a file.

Parameters
[in]sourceThe source path.
[in]destThe destination path.
Returns
true if the file was moved, otherwise false.

◆ GeFCreateDir()

Bool GeFCreateDir ( const Filename name)

Creates a directory.

Warning
Only one directory level is created. If more than one directory in the path specified by name does not exist then this function will fail to create them.
See also
GeFCreateDirRec()
Parameters
[in]nameThe name of the directory to create.
Returns
true if the directory was created, otherwise false.

◆ GeFCreateDirRec()

Bool GeFCreateDirRec ( const Filename name)

Creates a directory even if the directories in the path do not exist.

Parameters
[in]nameThe name of the directory to create.
Returns
true if the directory was created, otherwise false.

◆ GeFGetDiskFreeSpace()

Bool GeFGetDiskFreeSpace ( const Filename vol,
UInt64 freecaller,
UInt64 total,
UInt64 freespace 
)

Retrieves information about the amount of space that is available on a disk volume.

Parameters
[in]volThe name of the disk volume.
[out]freecallerAssigned the number of bytes on the volume available to the calling application.
[out]totalAssigned the total number of bytes on a disk.
[out]freespaceAssigned the number of bytes of free space on the volume.
Returns
true if disk free space information was retrieved, otherwise false.

◆ GeFGetAttributes()

UInt32 GeFGetAttributes ( const Filename name)

Gets the attributes of a file.

Parameters
[in]nameThe file name.
Returns
The attribute flags: GE_FILE_ATTRIBUTE

◆ GeFSetAttributes()

Bool GeFSetAttributes ( const Filename name,
UInt32  flags,
UInt32  mask = (UInt32) - 1 
)

Sets the attributes for a file.

Parameters
[in]nameThe file name.
[in]flagsThe attribute flags: GE_FILE_ATTRIBUTE
[in]maskAn attribute mask to protect already set flags: GE_FILE_ATTRIBUTE
Returns
true if the attributes could be set, otherwise false.