#include <sys/types.h>
#include <time.h>
#include <libpackman/package.h>
Go to the source code of this file.
Data Structures | |
struct | _PmFile |
A representation of a file on the filesystem. More... | |
Structure (De)allocation Functions | |
PmFile * | pmNewFile (void) |
Creates a new PmFile structure. | |
PmFile * | pmDuplicateFile (PmFile *baseFile) |
Duplicates a PmFile structure. | |
void | pmDestroyFile (PmFile *file) |
Destroys a PmFile structure. | |
Attribute Modification Functions | |
void | pmSetFilePackage (PmFile *file, PmPackage *package) |
Sets the package that owns the specified file. | |
void | pmSetFileName (PmFile *file, const char *name) |
Sets the name of the specified file. | |
void | pmSetFileChecksum (PmFile *file, const char *checksum) |
Sets the MD5 checksum of the specified file. | |
void | pmSetFileMode (PmFile *file, mode_t mode) |
Sets the mode of the specified file. | |
void | pmSetFileOwner (PmFile *file, const char *owner) |
Sets the owner of the specified file. | |
void | pmSetFileGroup (PmFile *file, const char *group) |
Sets the group of the specified file. | |
void | pmSetFileType (PmFile *file, PmFileType type) |
Sets the file type of the specified file. | |
void | pmSetFileMajorMinor (PmFile *file, unsigned short majorMinor) |
Sets the major/minor numbers of the specified file. | |
void | pmSetFileSize (PmFile *file, unsigned int size) |
Sets the size of the specified file. | |
void | pmSetFileDate (PmFile *file, time_t date) |
Sets the timestamp of the specified file. | |
void | pmSetFileSymlink (PmFile *file, const char *symlink) |
Sets the file that this file links to. | |
Attribute Retrieval Functions | |
PmPackage * | pmGetFilePackage (PmFile *file) |
Returns the package that owns the specified file. | |
const char * | pmGetFileName (PmFile *file) |
Returns the name of the specified file. | |
const char * | pmGetFileChecksum (PmFile *file) |
Returns the MD5 checksum of the specified file. | |
mode_t | pmGetFileMode (PmFile *file) |
Returns the mode of the specified file. | |
const char * | pmGetFileOwner (PmFile *file) |
Returns the owner username of the specified file. | |
const char * | pmGetFileGroup (PmFile *file) |
Returns the owner group of the specified file. | |
PmFileType | pmGetFileType (PmFile *file) |
Returns the type of the specified file. | |
unsigned short | pmGetFileMajorMinor (PmFile *file) |
Returns the major/minor numbers for this file. | |
unsigned int | pmGetFileSize (PmFile *file) |
Returns the size of this file. | |
time_t | pmGetFileDate (PmFile *file) |
Returns the date/time in seconds since the epoch. | |
const char * | pmGetFileSymlink (PmFile *file) |
Returns the file this file is pointing to (if any). | |
Iteration Functions | |
PmFile * | pmFirstFile (PmPackage *pkg) |
Returns the first file in the package. | |
PmFile * | pmPreviousFile (PmFile *file) |
Returns the previous file in the list of files. | |
PmFile * | pmNextFile (PmFile *file) |
Returns the next file in the list of files. | |
Utility Functions | |
const char * | pmFileTypeToName (PmFileType type) |
Converts a file type to its string equivalent. | |
PmFileType | pmFileTypeFromName (const char *name) |
Converts the string equivalent of a file type to its PmFileType version. | |
Typedefs | |
typedef _PmFile | PmFile |
PmFile. | |
typedef enum _PmFileType | PmFileType |
A file type. | |
Enumerations | |
enum | _PmFileType { PM_FILETYPE_NORMAL, PM_FILETYPE_CONFIG, PM_FILETYPE_DOCUMENTATION, PM_FILETYPE_DEVICE, PM_FILETYPE_DIRECTORY, PM_FILETYPE_UNKNOWN } |
A file type. More... |
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
PmFile.
|
|
A file type.
|
|
A file type.
|
|
Destroys a PmFile structure.
|
|
Duplicates a PmFile structure.
|
|
Converts the string equivalent of a file type to its PmFileType version.
|
|
Converts a file type to its string equivalent.
|
|
Returns the first file in the package.
|
|
Returns the MD5 checksum of the specified file.
|
|
Returns the date/time in seconds since the epoch.
|
|
Returns the owner group of the specified file.
|
|
Returns the major/minor numbers for this file.
|
|
Returns the mode of the specified file.
|
|
Returns the name of the specified file.
|
|
Returns the owner username of the specified file.
|
|
Returns the package that owns the specified file.
|
|
Returns the size of this file.
|
|
Returns the file this file is pointing to (if any).
|
|
Returns the type of the specified file.
|
|
Creates a new PmFile structure.
|
|
Returns the next file in the list of files.
|
|
Returns the previous file in the list of files.
|
|
Sets the MD5 checksum of the specified file.
|
|
Sets the timestamp of the specified file.
|
|
Sets the group of the specified file.
|
|
Sets the major/minor numbers of the specified file. This is only used if the file is of type PM_FILETYPE_DEVICE.
|
|
Sets the mode of the specified file.
|
|
Sets the name of the specified file.
|
|
Sets the owner of the specified file.
|
|
Sets the package that owns the specified file. This should only be used by libpackman.
|
|
Sets the size of the specified file.
|
|
Sets the file that this file links to.
If this file is not a symlink, symlink should be
|
|
Sets the file type of the specified file.
|