Extending Qt Creator Manual | FileNode

Extending Qt Creator Manual 4.4.0

# FileNode Class

(ProjectExplorer::FileNode)

The FileNode class is an in-memory presentation of a file. More...

Header: | #include <FileNode>
Inherits: | ProjectExplorer::Node

- List of all members, including inherited members

## Public Functions

| FileNode(const Utils::FileName &filePath, const FileType fileType, bool generated, int line = -1, const QByteArray &id = {})
FileNode * | clone() const
FileType | fileType() const

## Reimplemented Public Functions

virtual FileNode * | asFileNode() final
virtual const FileNode * | asFileNode() const final
virtual bool | supportsAction(ProjectAction action, Node *node) const override

- 27 public functions inherited from ProjectExplorer::Node

## Static Public Members

QList<FileNode *> | scanForFiles(const Utils::FileName &directory, const std::function<FileNode *( const Utils::FileName & fileName ) > factory, QFutureInterface<QList<FileNode *>> * future = nullptr)
QList<FileNode *> | scanForFilesWithVersionControls(const Utils::FileName &directory, const std::function<FileNode *( const Utils::FileName & fileName ) > factory, const QList<Core::IVersionControl *> &versionControls, QFutureInterface<QList<FileNode *>> * future = nullptr)

- 3 static public members inherited from ProjectExplorer::Node

### Additional Inherited Members

- 2 protected functions inherited from ProjectExplorer::Node

## Detailed Description

The FileNode class is an in-memory presentation of a file.

All file nodes are leaf nodes.

See also ProjectExplorer::FolderNode and ProjectExplorer::ProjectNode.

## Member Function Documentation

### FileNode::FileNode(const Utils::FileName &filePath, const FileType fileType, bool generated, int line = -1, const QByteArray &id = {})

Default constructs an instance of FileNode.

### `[final virtual]` FileNode *FileNode::asFileNode()

### `[final virtual]` const FileNode *FileNode::asFileNode() const

### FileNode *FileNode::clone() const

### FileType FileNode::fileType() const

### `[static]` QList<FileNode *> FileNode::scanForFiles(const Utils::FileName &directory, const std::function<FileNode *( const Utils::FileName & fileName ) > factory, QFutureInterface<QList<FileNode *>> * future = nullptr)

### `[static]` QList<FileNode *> FileNode::scanForFilesWithVersionControls(const Utils::FileName &directory, const std::function<FileNode *( const Utils::FileName & fileName ) > factory, const QList<Core::IVersionControl *> &versionControls, QFutureInterface<QList<FileNode *>> * future = nullptr)

### `[override virtual]` bool FileNode::supportsAction(ProjectAction action, Node *node) const