struct CCL::IFileManager

Overview

File manager interface. More…

#include <ifilemanager.h>

struct IFileManager: public CCL::IUnknown
{
    // enums

    enum Flags;

    // methods

    virtual tresult CCL_API addWatchedLocation (UrlRef url, int flags = kDeep) = 0;
    virtual tresult CCL_API removeWatchedLocation (UrlRef url) = 0;
    virtual tresult CCL_API setFileUsed (UrlRef url, tbool state) = 0;
    virtual tresult CCL_API setFileWriting (UrlRef url, tbool state) = 0;
    virtual IAsyncOperation*CCL_API triggerFileUpdate (UrlRef url) = 0;

    virtual tbool CCL_API getFileDisplayString (
        String& string,
        UrlRef url,
        int type
    ) const = 0;

    virtual StringID CCL_API getFileLocationType (UrlRef url) const = 0;
    virtual void CCL_API terminate () = 0;
    IFileManager bool isCloudLocationType (StringID type) const;
};

Inherited Members

public:
    // methods

    virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0;
    virtual unsigned int CCL_API retain () = 0;
    virtual unsigned int CCL_API release () = 0;

Detailed Documentation

File manager interface.

Methods

virtual tresult CCL_API addWatchedLocation (UrlRef url, int flags = kDeep) = 0

Add location to be watched (file or folder).

Generate Signals::kFileSystem messages for given url

virtual tresult CCL_API removeWatchedLocation (UrlRef url) = 0

Remove location to be watched.

virtual tresult CCL_API setFileUsed (UrlRef url, tbool state) = 0

Report that the application is using the given file or folder.

A used file should not be modified. If the application is using a folder, it should be granted write access.

virtual tresult CCL_API setFileWriting (UrlRef url, tbool state) = 0

Report that the application is writing the file.

virtual IAsyncOperation*CCL_API triggerFileUpdate (UrlRef url) = 0

Trigger file updates (download from server etc).

virtual tbool CCL_API getFileDisplayString (
    String& string,
    UrlRef url,
    int type
) const = 0

Convert file URL to user-friendly display representation, type is IUrl::StringType.

virtual StringID CCL_API getFileLocationType (UrlRef url) const = 0

Classify file or folder location.

/see FileLocationType

virtual void CCL_API terminate () = 0

Exit all threads and cleanup.

IFileManager bool isCloudLocationType (StringID type) const

Check if location type is a cloud location.