/usr/include/k3bfileitem.h is in libk3b-dev 17.12.3-0ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | /*
*
* Copyright (C) 2003-2008 Sebastian Trueg <trueg@k3b.org>
*
* This file is part of the K3b project.
* Copyright (C) 1998-2008 Sebastian Trueg <trueg@k3b.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* See the file "COPYING" for the exact licensing terms.
*/
#ifndef K3BFILEITEM_H
#define K3BFILEITEM_H
#include "k3bdataitem.h"
#include "k3bglobals.h"
#include <KIOCore/KIO/Global>
#include <QtCore/QString>
#include "k3b_export.h"
namespace K3b {
class DataDoc;
class DirItem;
class LIBK3B_EXPORT FileItem : public DataItem
{
public:
/**
* Creates a new FileItem
*/
FileItem( const QString& filePath, DataDoc& doc, const QString& k3bName = 0, const ItemFlags& flags = ItemFlags() );
/**
* Constructor for optimized file item creation which does no additional stat.
*
* Used by K3b to speedup file item creation.
*/
FileItem( const k3b_struct_stat* stat,
const k3b_struct_stat* followedStat,
const QString& filePath, DataDoc& doc, const QString& k3bName = 0, const ItemFlags& flags = ItemFlags() );
/**
* Default copy constructor
* Creates a copy of the fileitem. The copy, however, is not an exact duplicate of this item.
* The copy does not have a parent dir set and any old session items are set to 0.
*/
FileItem( const FileItem& );
virtual ~FileItem();
virtual DataItem* copy() const;
bool exists() const;
QString absIsoPath();
/** reimplemented from DataItem */
QString localPath() const;
/**
* Identification of the files on the local device.
*/
struct Id {
dev_t device;
ino_t inode;
};
/**
* This is not the normal inode number but it also contains
* the device number.
*/
Id localId() const;
/**
* The id of the file the symlink is pointing to
*/
Id localId( bool followSymlinks ) const;
DirItem* getDirItem() const;
QString linkDest() const;
QMimeType mimeType() const override;
/** returns true if the item is not a link or
* if the link's destination is part of the compilation */
bool isValid() const;
DataItem* replaceItemFromOldSession() const { return m_replacedItemFromOldSession; }
void setReplacedItemFromOldSession( DataItem* item ) { m_replacedItemFromOldSession = item; }
/**
* Normally one does not use this method but DataItem::size()
*/
KIO::filesize_t itemSize( bool followSymlinks ) const;
private:
void init( const QString& filePath,
const QString& k3bName,
DataDoc& doc,
const k3b_struct_stat* stat,
const k3b_struct_stat* followedStat );
private:
DataItem* m_replacedItemFromOldSession;
KIO::filesize_t m_size;
KIO::filesize_t m_sizeFollowed;
Id m_id;
Id m_idFollowed;
QString m_localPath;
QMimeType m_mimeType;
};
bool operator==( const FileItem::Id&, const FileItem::Id& );
bool operator<( const FileItem::Id&, const FileItem::Id& );
bool operator>( const FileItem::Id&, const FileItem::Id& );
}
#endif
|