Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CFileItemList Class Reference

Represents a list of files. More...

#include <FileItemList.h>

Inheritance diagram for CFileItemList:
CFileItem CGUIListItem IArchivable ISerializable ISortable

Public Types

enum class  CacheType { NEVER = 0 , IF_SLOW , ALWAYS }
 
using Iterator = std::vector< std::shared_ptr< CFileItem > >::iterator
 
- Public Types inherited from CGUIListItem
enum  GUIIconOverlay {
  ICON_OVERLAY_NONE = 0 , ICON_OVERLAY_RAR , ICON_OVERLAY_ZIP , ICON_OVERLAY_LOCKED ,
  ICON_OVERLAY_UNWATCHED , ICON_OVERLAY_WATCHED , ICON_OVERLAY_HD
}
 
using PropertyMap = std::map< std::string, CVariant, CaseInsensitiveCompare >
 

Public Member Functions

 CFileItemList ()
 
 CFileItemList (const std::string &strPath)
 
 ~CFileItemList () override
 
void Archive (CArchive &ar) override
 
CFileItemPtr operator[] (int iItem) const
 
CFileItemPtr operator[] (const std::string &strPath) const
 
void Clear ()
 
void ClearItems ()
 
void Add (CFileItemPtr item)
 
void Add (CFileItem &&item)
 
void AddFront (const CFileItemPtr &pItem, int itemPosition)
 
void Remove (const CFileItem *pItem)
 
void Remove (int iItem)
 
CFileItemPtr Get (int iItem) const
 
const auto & GetList () const
 
CFileItemPtr Get (const std::string &strPath) const
 
int Size () const
 
bool IsEmpty () const
 
void Append (const CFileItemList &itemlist)
 
void Assign (const CFileItemList &itemlist, bool append=false)
 
bool Copy (const CFileItemList &item, bool copyItems=true)
 
void Reserve (size_t iCount)
 
void Sort (SortBy sortBy, SortOrder sortOrder, SortAttribute sortAttributes=SortAttributeNone)
 
void Sort (SortDescription sortDescription)
 
void Randomize ()
 
void FillInDefaultIcons ()
 
int GetFolderCount () const
 
int GetFileCount () const
 
int GetSelectedCount () const
 
int GetObjectCount () const
 
void FilterCueItems ()
 
void RemoveExtensions ()
 
void SetIgnoreURLOptions (bool ignoreURLOptions)
 
void SetFastLookup (bool fastLookup)
 
bool Contains (const std::string &fileName) const
 
bool GetFastLookup () const
 
void Stack (bool stackFiles=true)
 stack a CFileItemList By default we stack all items (files and folders) in a CFileItemList
 
SortOrder GetSortOrder () const
 
SortBy GetSortMethod () const
 
void SetSortOrder (SortOrder sortOrder)
 
void SetSortMethod (SortBy sortBy)
 
bool Load (int windowID=0)
 load a CFileItemList out of the cache
 
bool Save (int windowID=0)
 save a CFileItemList to the cache
 
void SetCacheToDisc (CacheType cacheToDisc)
 
bool CacheToDiscAlways () const
 
bool CacheToDiscIfSlow () const
 
void RemoveDiscCache (int windowID=0) const
 remove a previously cached CFileItemList from the cache
 
void RemoveDiscCache (const std::string &cachefile) const
 
void RemoveDiscCacheCRC (const std::string &crc) const
 
bool AlwaysCache () const
 
void Swap (unsigned int item1, unsigned int item2)
 
bool UpdateItem (const CFileItem *item)
 Update an item in the item list.
 
void AddSortMethod (SortBy sortBy, int buttonLabel, const LABEL_MASKS &labelMasks, SortAttribute sortAttributes=SortAttributeNone)
 
void AddSortMethod (SortBy sortBy, SortAttribute sortAttributes, int buttonLabel, const LABEL_MASKS &labelMasks)
 
void AddSortMethod (const SortDescription &sortDescription, int buttonLabel, const LABEL_MASKS &labelMasks)
 
bool HasSortDetails () const
 
const std::vector< GUIViewSortDetails > & GetSortDetails () const
 
void SetSortIgnoreFolders (bool sort)
 Specify whether this list should be sorted with folders separate from files By default we sort with folders listed (and sorted separately) except for those sort modes which should be explicitly sorted with folders interleaved with files (eg SORT_METHOD_FILES). With this set the folder state will be ignored, allowing folders and files to sort interleaved.
 
bool GetReplaceListing () const
 
void SetReplaceListing (bool replace)
 
void SetContent (std::string_view content)
 
const std::string & GetContent () const
 
void ClearSortState ()
 
auto begin ()
 
auto end ()
 
auto begin () const
 
auto end () const
 
Iterator erase (Iterator first, Iterator last)
 
auto cbegin () const
 
auto cend () const
 
auto rbegin () const
 
auto rend () const
 
- Public Member Functions inherited from CFileItem
 CFileItem ()
 
 CFileItem (const CFileItem &item)
 
 CFileItem (const CGUIListItem &item)
 
 CFileItem (const std::string &strLabel)
 
 CFileItem (const char *strLabel)
 
 CFileItem (const CURL &path, bool bIsFolder)
 
 CFileItem (std::string_view strPath, bool bIsFolder)
 
 CFileItem (const CSong &song)
 
 CFileItem (const CSong &song, const MUSIC_INFO::CMusicInfoTag &music)
 
 CFileItem (const CURL &path, const CAlbum &album)
 
 CFileItem (std::string_view path, const CAlbum &album)
 
 CFileItem (const CArtist &artist)
 
 CFileItem (const CGenre &genre)
 
 CFileItem (const MUSIC_INFO::CMusicInfoTag &music)
 
 CFileItem (const CVideoInfoTag &movie)
 
 CFileItem (const std::shared_ptr< PVR::CPVREpgInfoTag > &tag)
 
 CFileItem (const std::shared_ptr< PVR::CPVREpgSearchFilter > &filter)
 
 CFileItem (const std::shared_ptr< PVR::CPVRChannelGroupMember > &channelGroupMember)
 
 CFileItem (const std::shared_ptr< PVR::CPVRRecording > &record)
 
 CFileItem (const std::shared_ptr< PVR::CPVRTimerInfoTag > &timer)
 
 CFileItem (const std::string_view path, const std::shared_ptr< PVR::CPVRProvider > &provider)
 
 CFileItem (const CMediaSource &share)
 
 CFileItem (const std::shared_ptr< const ADDON::IAddon > &addonInfo)
 
 CFileItem (const std::shared_ptr< const IEvent > &eventLogEntry)
 
 ~CFileItem () override
 
CGUIListItemClone () const override
 
CURL GetURL () const
 
void SetURL (const CURL &url)
 
bool IsURL (const CURL &url) const
 
const std::string & GetPath () const
 
void SetPath (std::string_view path)
 
bool IsPath (const std::string &path, bool ignoreURLOptions=false) const
 
CURL GetDynURL () const
 
void SetDynURL (const CURL &url)
 
const std::string & GetDynPath () const
 
void SetDynPath (std::string_view path)
 
CFileItemoperator= (const CFileItem &item)
 
void Serialize (CVariant &value) const override
 
void ToSortable (SortItem &sortable, Field field) const override
 
void ToSortable (SortItem &sortable, const Fields &fields) const
 
bool IsFileItem () const override
 
bool Exists (bool bUseCache=true) const
 
bool IsPicture () const
 Check whether an item is a picture item. Note that this returns true for anything with a picture info tag, so that may include eg. folders.
 
bool IsDeleted () const
 Check whether an item is 'deleted' (for example, a trashed pvr recording).
 
bool IsGame () const
 
bool IsLibraryFolder () const
 
bool IsPythonScript () const
 
bool IsPlugin () const
 
bool IsScript () const
 
bool IsAddonsPath () const
 
bool IsSourcesPath () const
 
bool IsNFO () const
 
bool IsDiscImage () const
 
bool IsOpticalMediaFile () const
 
bool IsBluray () const
 
bool IsRAR () const
 
bool IsAPK () const
 
bool IsZIP () const
 
bool IsCBZ () const
 
bool IsCBR () const
 
bool IsISO9660 () const
 
bool IsDVD () const
 
bool IsOnDVD () const
 
bool IsHD () const
 
bool IsNfs () const
 
bool IsSmb () const
 
bool IsURL () const
 
bool IsStack () const
 
bool IsFavourite () const
 
bool IsMultiPath () const
 
bool IsEPG () const
 
bool IsPVRChannel () const
 
bool IsPVRChannelGroup () const
 
bool IsPVRRecording () const
 
bool IsUsablePVRRecording () const
 
bool IsDeletedPVRRecording () const
 
bool IsInProgressPVRRecording () const
 
bool IsPVRTimer () const
 
bool IsPVRProvider () const
 
bool IsType (const char *ext) const
 
bool IsVirtualDirectoryRoot () const
 
bool IsReadOnly () const
 
bool CanQueue () const
 
void SetCanQueue (bool bYesNo)
 
bool IsParentFolder () const
 
bool IsFileFolder (FileFolderType types=FileFolderType::MASK_ALL) const
 
bool IsRemovable () const
 
bool IsPVR () const
 
bool IsLiveTV () const
 
bool IsRSS () const
 
bool IsAndroidApp () const
 
bool HasVideoVersions () const
 
bool HasVideoExtras () const
 
void RemoveExtension ()
 
void CleanString ()
 
void SetFileSizeLabel ()
 
void SetLabel (const std::string &strLabel) override
 
VideoDbContentType GetVideoContentType () const
 
bool IsLabelPreformatted () const
 
void SetLabelPreformatted (bool bYesNo)
 
const std::string & GetDVDLabel () const
 
void SetDVDLabel (std::string_view label)
 
bool IsShareOrDrive () const
 
void SetIsShareOrDrive (bool set)
 
SourceType GetDriveType () const
 
void SetDriveType (SourceType driveType)
 
const CDateTimeGetDateTime () const
 
void SetDateTime (const CDateTime &dateTime)
 
void SetDateTime (time_t dateTime)
 
void SetDateTime (KODI::TIME::SystemTime dateTime)
 
void SetDateTime (KODI::TIME::FileTime dateTime)
 
int64_t GetSize () const
 
void SetSize (int64_t size)
 
const std::string & GetTitle () const
 
void SetTitle (std::string_view title)
 
int GetProgramCount () const
 
void SetProgramCount (int count)
 
int GetDepth () const
 
void SetDepth (int depth)
 
int GetStartPartNumber () const
 
void SetStartPartNumber (int number)
 
bool SortsOnTop () const
 
bool SortsOnBottom () const
 
void SetSpecialSort (SortSpecial sort)
 
bool HasMusicInfoTag () const
 
MUSIC_INFO::CMusicInfoTagGetMusicInfoTag ()
 
const MUSIC_INFO::CMusicInfoTagGetMusicInfoTag () const
 
bool HasVideoInfoTag () const
 
CVideoInfoTagGetVideoInfoTag ()
 
const CVideoInfoTagGetVideoInfoTag () const
 
bool HasEPGInfoTag () const
 
std::shared_ptr< PVR::CPVREpgInfoTagGetEPGInfoTag () const
 
bool HasEPGSearchFilter () const
 
std::shared_ptr< PVR::CPVREpgSearchFilterGetEPGSearchFilter () const
 
bool HasPVRChannelGroupMemberInfoTag () const
 
std::shared_ptr< PVR::CPVRChannelGroupMemberGetPVRChannelGroupMemberInfoTag () const
 
bool HasPVRChannelInfoTag () const
 
std::shared_ptr< PVR::CPVRChannelGetPVRChannelInfoTag () const
 
bool HasPVRRecordingInfoTag () const
 
std::shared_ptr< PVR::CPVRRecordingGetPVRRecordingInfoTag () const
 
bool HasPVRTimerInfoTag () const
 
std::shared_ptr< PVR::CPVRTimerInfoTagGetPVRTimerInfoTag () const
 
bool HasPVRProviderInfoTag () const
 
std::shared_ptr< PVR::CPVRProviderGetPVRProviderInfoTag () const
 
CFileItem GetItemToPlay () const
 return the item to play. will be almost 'this', but can be different (e.g. "Play recording" from PVR EPG grid window)
 
bool IsResumePointSet () const
 Test if this item has a valid resume point set.
 
double GetCurrentResumeTime () const
 Return the current resume time.
 
bool GetCurrentResumeTimeAndPartNumber (int64_t &startOffset, int &partNumber) const
 Return the current resume time and part.
 
bool IsResumable () const
 Test if this item type can be resumed.
 
int64_t GetStartOffset () const
 Get the offset where start the playback.
 
void SetStartOffset (const int64_t offset)
 Set the offset where start the playback.
 
int64_t GetEndOffset () const
 Get the end offset.
 
void SetEndOffset (const int64_t offset)
 Set the end offset.
 
bool HasPictureInfoTag () const
 
const CPictureInfoTagGetPictureInfoTag () const
 
bool HasAddonInfo () const
 
std::shared_ptr< const ADDON::IAddonGetAddonInfo () const
 
bool HasGameInfoTag () const
 
KODI::GAME::CGameInfoTagGetGameInfoTag ()
 
const KODI::GAME::CGameInfoTagGetGameInfoTag () const
 
CPictureInfoTagGetPictureInfoTag ()
 
std::string FindLocalArt (const std::string &artFile, bool useFolder) const
 Assemble the filename of a particular piece of local artwork for an item, and check for file existence.
 
bool SkipLocalArt () const
 Whether or not to skip searching for local art.
 
std::string GetThumbHideIfUnwatched (const CFileItem *item) const
 Get the thumb for the item, but hide it to prevent spoilers if the user has set 'Show information for unwatched items' appropriately.
 
std::string GetMovieName (bool bUseFolderNames=false) const
 
std::string GetBaseMoviePath (bool useFolderNames) const
 Find the base movie path (i.e. the item the user expects us to use to lookup the movie) For folder items, with "use foldernames for lookups" it returns the folder. Regardless of settings, for VIDEO_TS/BDMV it returns the parent of the VIDEO_TS/BDMV folder (if present)
 
std::string GetUserMusicThumb (bool alwaysCheckRemote=false, bool fallbackToFolder=false) const
 
std::string GetLocalMetadataPath () const
 Get the path where we expect local metadata to reside. For a folder, this is just the existing path (eg tvshow folder) For a file, this is the parent path, with exceptions made for VIDEO_TS and BDMV files.
 
bool LoadMusicTag ()
 
bool LoadGameTag ()
 
bool LoadDetails ()
 Load detailed data for an item constructed with only a path and a folder flag Fills item's video info tag, sets item properties.
 
const std::string & GetMimeType () const
 
void SetMimeType (std::string_view mimetype)
 
void FillInMimeType (bool lookup=true)
 Resolve the MIME type based on file extension or a web lookup If m_mimetype is already set (non-empty), this function has no effect. For http:// and shout:// streams, this will query the stream (blocking operation). Set lookup=false to skip any internet lookups and always return immediately.
 
bool ContentLookup () const
 Some sources do not support HTTP HEAD request to determine i.e. mime type.
 
void SetMimeTypeForInternetFile ()
 (Re)set the mime-type for internet files if allowed (m_doContentLookup) Some sources do not support HTTP HEAD request to determine i.e. mime type
 
void SetContentLookup (bool enable)
 Lookup via HTTP HEAD request might not be needed, use this setter to disable ContentLookup.
 
void SetExtraInfo (std::string_view info)
 
const std::string & GetExtraInfo () const
 
void UpdateInfo (const CFileItem &item, bool replaceLabels=true)
 Update an item with information from another item We take metadata information from the given item and supplement the current item with that info. If tags exist in the new item we use the entire tag information. Properties are appended, and labels, thumbnail and icon are updated if non-empty in the given item.
 
void MergeInfo (const CFileItem &item)
 Merge an item with information from another item We take metadata/art information from the given item and supplement the current item with that info. If tags exist in the new item we only merge the missing tag information. Properties are appended, and labels are updated if non-empty in the given item.
 
bool IsSamePath (const CFileItem *item) const
 
bool IsAlbum () const
 
void SetFromVideoInfoTag (const CVideoInfoTag &video)
 Sets details using the information from the CVideoInfoTag object Sets the videoinfotag and uses its information to set the label and path.
 
void SetFromMusicInfoTag (const MUSIC_INFO::CMusicInfoTag &music)
 Sets details using the information from the CMusicInfoTag object Sets the musicinfotag and uses its information to set the label and path.
 
void SetFromAlbum (const CAlbum &album)
 Sets details using the information from the CAlbum object Sets the album in the music info tag and uses its information to set the label and album-specific properties.
 
void SetFromSong (const CSong &song)
 Sets details using the information from the CSong object Sets the song in the music info tag and uses its information to set the label, path, song-specific properties and artwork.
 
KODI::UTILS::CLockInfoGetLockInfo ()
 Retrieve item's lock information, like lock code, lock mode, etc.
 
const KODI::UTILS::CLockInfoGetLockInfo () const
 Retrieve item's lock information, like lock code, lock mode, etc.
 
void SetCueDocument (const std::shared_ptr< CCueDocument > &cuePtr)
 
void LoadEmbeddedCue ()
 
bool HasCueDocument () const
 
bool LoadTracksFromCueDocument (CFileItemList &scannedItems)
 
- Public Member Functions inherited from CGUIListItem
 CGUIListItem ()
 
 CGUIListItem (const CGUIListItem &item)
 
 CGUIListItem (const std::string &strLabel)
 
virtual ~CGUIListItem ()
 
CGUIListItemoperator= (const CGUIListItem &item)
 
const std::string & GetLabel () const
 
void SetLabel2 (std::string_view strLabel)
 
const std::string & GetLabel2 () const
 
void SetFolder (bool isFolder)
 
bool IsFolder () const
 
void SetOverlayImage (GUIIconOverlay icon)
 
std::string GetOverlayImage () const
 
void SetArt (const std::string &type, std::string_view url)
 Set a particular art type for an item.
 
void SetArt (const KODI::ART::Artwork &art)
 set artwork for an item
 
void AppendArt (const KODI::ART::Artwork &art, const std::string &prefix="")
 append artwork to an item
 
void SetArtFallback (const std::string &from, std::string_view to)
 set a fallback image for art
 
void ClearArt ()
 clear art on an item
 
std::string GetArt (const std::string &type) const
 Get a particular art type for an item.
 
const KODI::ART::ArtworkGetArt () const
 get artwork for an item Retrieves artwork in a type:url map
 
bool HasArt (const std::string &type) const
 Check whether an item has a particular piece of art Equivalent to !GetArt(type).empty()
 
void SetSortLabel (const std::string &label)
 
void SetSortLabel (const std::wstring &label)
 
const std::wstring & GetSortLabel () const
 
void Select (bool bOnOff)
 
bool IsSelected () const
 
bool HasOverlay () const
 
void SetLayout (std::unique_ptr< CGUIListItemLayout > layout)
 
CGUIListItemLayoutGetLayout ()
 
void SetFocusedLayout (std::unique_ptr< CGUIListItemLayout > layout)
 
CGUIListItemLayoutGetFocusedLayout ()
 
void FreeIcons ()
 
void FreeMemory (bool immediately=false)
 
void SetInvalid ()
 
void SetProperty (const std::string &strKey, const CVariant &value)
 
void IncrementProperty (const std::string &strKey, int nVal)
 
void IncrementProperty (const std::string &strKey, int64_t nVal)
 
void IncrementProperty (const std::string &strKey, double dVal)
 
void ClearProperties ()
 
void AppendProperties (const CGUIListItem &item)
 Append the properties of one CGUIListItem to another. Any existing properties in the current item will be overridden if they are set in the passed in item.
 
void Archive (CArchive &ar)
 
void Serialize (CVariant &value) const
 
bool HasProperty (const std::string &strKey) const
 
bool HasProperties () const
 
void ClearProperty (const std::string &strKey)
 
const CVariantGetProperty (const std::string &strKey) const
 
const PropertyMapGetProperties () const
 
void SetProperties (const PropertyMap &props)
 
void SetCurrentItem (unsigned int position)
 Set the current item number within it's container Our container classes will set this member with the items position in the container starting at 1.
 
unsigned int GetCurrentItem () const
 Get the current item number within it's container Retrieve the items position in a container, this is useful to show for example numbering in front of entities in an arbitrary list of entities, like songs of a playlist.
 

Additional Inherited Members

- Protected Member Functions inherited from IArchivable
virtual ~IArchivable ()=default
 
- Protected Member Functions inherited from ISerializable
 ~ISerializable ()=default
 
- Protected Member Functions inherited from ISortable
 ~ISortable ()=default
 

Detailed Description

Represents a list of files.

See also
CFileItemList, CFileItem

Member Typedef Documentation

◆ Iterator

using CFileItemList::Iterator = std::vector<std::shared_ptr<CFileItem> >::iterator

Member Enumeration Documentation

◆ CacheType

enum class CFileItemList::CacheType
strong
Enumerator
NEVER 
IF_SLOW 
ALWAYS 

Constructor & Destructor Documentation

◆ CFileItemList() [1/2]

CFileItemList::CFileItemList ( )

◆ CFileItemList() [2/2]

CFileItemList::CFileItemList ( const std::string &  strPath)
explicit

◆ ~CFileItemList()

CFileItemList::~CFileItemList ( )
override

Member Function Documentation

◆ Add() [1/2]

void CFileItemList::Add ( CFileItem &&  item)

◆ Add() [2/2]

void CFileItemList::Add ( CFileItemPtr  item)

◆ AddFront()

void CFileItemList::AddFront ( const CFileItemPtr pItem,
int  itemPosition 
)

◆ AddSortMethod() [1/3]

void CFileItemList::AddSortMethod ( const SortDescription sortDescription,
int  buttonLabel,
const LABEL_MASKS labelMasks 
)

◆ AddSortMethod() [2/3]

void CFileItemList::AddSortMethod ( SortBy  sortBy,
int  buttonLabel,
const LABEL_MASKS labelMasks,
SortAttribute  sortAttributes = SortAttributeNone 
)

◆ AddSortMethod() [3/3]

void CFileItemList::AddSortMethod ( SortBy  sortBy,
SortAttribute  sortAttributes,
int  buttonLabel,
const LABEL_MASKS labelMasks 
)

◆ AlwaysCache()

bool CFileItemList::AlwaysCache ( ) const

◆ Append()

void CFileItemList::Append ( const CFileItemList itemlist)

◆ Archive()

void CFileItemList::Archive ( CArchive ar)
overridevirtual

Reimplemented from CFileItem.

◆ Assign()

void CFileItemList::Assign ( const CFileItemList itemlist,
bool  append = false 
)
Todo:
Is it intentional not to copy CFileItem properties, except path, label and property map? This is different from CFileItemList::Copy. Why?
Todo:
Is it intentional not to copy m_ignoreURLOptions, m_fastLookup, m_sortIgnoreFolders, m_content? This is (partly) different from CFileItemList::Copy. Why?

◆ begin() [1/2]

auto CFileItemList::begin ( )
inline

◆ begin() [2/2]

auto CFileItemList::begin ( ) const
inline

◆ CacheToDiscAlways()

bool CFileItemList::CacheToDiscAlways ( ) const
inline

◆ CacheToDiscIfSlow()

bool CFileItemList::CacheToDiscIfSlow ( ) const
inline

◆ cbegin()

auto CFileItemList::cbegin ( ) const
inline

◆ cend()

auto CFileItemList::cend ( ) const
inline

◆ Clear()

void CFileItemList::Clear ( )

◆ ClearItems()

void CFileItemList::ClearItems ( )

◆ ClearSortState()

void CFileItemList::ClearSortState ( )

◆ Contains()

bool CFileItemList::Contains ( const std::string &  fileName) const

◆ Copy()

bool CFileItemList::Copy ( const CFileItemList item,
bool  copyItems = true 
)
Todo:
Is it intentional not to copy m_ignoreURLOptions, m_fastLookup ?

◆ end() [1/2]

auto CFileItemList::end ( )
inline

◆ end() [2/2]

auto CFileItemList::end ( ) const
inline

◆ erase()

CFileItemList::Iterator CFileItemList::erase ( Iterator  first,
Iterator  last 
)

◆ FillInDefaultIcons()

void CFileItemList::FillInDefaultIcons ( )

◆ FilterCueItems()

void CFileItemList::FilterCueItems ( )

◆ Get() [1/2]

CFileItemPtr CFileItemList::Get ( const std::string &  strPath) const

◆ Get() [2/2]

CFileItemPtr CFileItemList::Get ( int  iItem) const

◆ GetContent()

const std::string & CFileItemList::GetContent ( ) const
inline

◆ GetFastLookup()

bool CFileItemList::GetFastLookup ( ) const
inline

◆ GetFileCount()

int CFileItemList::GetFileCount ( ) const

◆ GetFolderCount()

int CFileItemList::GetFolderCount ( ) const

◆ GetList()

const auto & CFileItemList::GetList ( ) const
inline

◆ GetObjectCount()

int CFileItemList::GetObjectCount ( ) const

◆ GetReplaceListing()

bool CFileItemList::GetReplaceListing ( ) const
inline

◆ GetSelectedCount()

int CFileItemList::GetSelectedCount ( ) const

◆ GetSortDetails()

const std::vector< GUIViewSortDetails > & CFileItemList::GetSortDetails ( ) const
inline

◆ GetSortMethod()

SortBy CFileItemList::GetSortMethod ( ) const
inline

◆ GetSortOrder()

SortOrder CFileItemList::GetSortOrder ( ) const
inline

◆ HasSortDetails()

bool CFileItemList::HasSortDetails ( ) const
inline

◆ IsEmpty()

bool CFileItemList::IsEmpty ( ) const

◆ Load()

bool CFileItemList::Load ( int  windowID = 0)

load a CFileItemList out of the cache

The file list may be cached based on which window we're viewing in, as different windows will be listing different portions of the same URL (eg viewing music files versus viewing video files)

Parameters
windowIDid of the window that's loading this list (defaults to 0)
Returns
true if we loaded from the cache, false otherwise.
See also
Save,RemoveDiscCache

◆ operator[]() [1/2]

CFileItemPtr CFileItemList::operator[] ( const std::string &  strPath) const

◆ operator[]() [2/2]

CFileItemPtr CFileItemList::operator[] ( int  iItem) const

◆ Randomize()

void CFileItemList::Randomize ( )

◆ rbegin()

auto CFileItemList::rbegin ( ) const
inline

◆ Remove() [1/2]

void CFileItemList::Remove ( const CFileItem pItem)

◆ Remove() [2/2]

void CFileItemList::Remove ( int  iItem)

◆ RemoveDiscCache() [1/2]

void CFileItemList::RemoveDiscCache ( const std::string &  cachefile) const

◆ RemoveDiscCache() [2/2]

void CFileItemList::RemoveDiscCache ( int  windowID = 0) const

remove a previously cached CFileItemList from the cache

The file list may be cached based on which window we're viewing in, as different windows will be listing different portions of the same URL (eg viewing music files versus viewing video files)

Parameters
windowIDid of the window whose cache we which to remove (defaults to 0)
See also
Save,Load

◆ RemoveDiscCacheCRC()

void CFileItemList::RemoveDiscCacheCRC ( const std::string &  crc) const

◆ RemoveExtensions()

void CFileItemList::RemoveExtensions ( )

◆ rend()

auto CFileItemList::rend ( ) const
inline

◆ Reserve()

void CFileItemList::Reserve ( size_t  iCount)

◆ Save()

bool CFileItemList::Save ( int  windowID = 0)

save a CFileItemList to the cache

The file list may be cached based on which window we're viewing in, as different windows will be listing different portions of the same URL (eg viewing music files versus viewing video files)

Parameters
windowIDid of the window that's saving this list (defaults to 0)
Returns
true if successful, false otherwise.
See also
Load,RemoveDiscCache

◆ SetCacheToDisc()

void CFileItemList::SetCacheToDisc ( CacheType  cacheToDisc)
inline

◆ SetContent()

void CFileItemList::SetContent ( std::string_view  content)
inline

◆ SetFastLookup()

void CFileItemList::SetFastLookup ( bool  fastLookup)

◆ SetIgnoreURLOptions()

void CFileItemList::SetIgnoreURLOptions ( bool  ignoreURLOptions)

◆ SetReplaceListing()

void CFileItemList::SetReplaceListing ( bool  replace)

◆ SetSortIgnoreFolders()

void CFileItemList::SetSortIgnoreFolders ( bool  sort)
inline

Specify whether this list should be sorted with folders separate from files By default we sort with folders listed (and sorted separately) except for those sort modes which should be explicitly sorted with folders interleaved with files (eg SORT_METHOD_FILES). With this set the folder state will be ignored, allowing folders and files to sort interleaved.

Parameters
sortwhether to ignore the folder state.

◆ SetSortMethod()

void CFileItemList::SetSortMethod ( SortBy  sortBy)
inline

◆ SetSortOrder()

void CFileItemList::SetSortOrder ( SortOrder  sortOrder)
inline

◆ Size()

int CFileItemList::Size ( ) const

◆ Sort() [1/2]

void CFileItemList::Sort ( SortBy  sortBy,
SortOrder  sortOrder,
SortAttribute  sortAttributes = SortAttributeNone 
)

◆ Sort() [2/2]

void CFileItemList::Sort ( SortDescription  sortDescription)

◆ Stack()

void CFileItemList::Stack ( bool  stackFiles = true)

stack a CFileItemList By default we stack all items (files and folders) in a CFileItemList

Parameters
stackFileswhether to stack all items or just collapse folders (defaults to true)
See also
StackFiles,StackFolders

◆ Swap()

void CFileItemList::Swap ( unsigned int  item1,
unsigned int  item2 
)

◆ UpdateItem()

bool CFileItemList::UpdateItem ( const CFileItem item)

Update an item in the item list.

Parameters
itemthe new item, which we match based on path to an existing item in the list
Returns
true if the item exists in the list (and was thus updated), false otherwise.

The documentation for this class was generated from the following files: