Loading...
Searching...
No Matches
juce::FileInputSource Class Reference

## Detailed Description

A type of InputSource that represents a normal file.

See also
  InputSource

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

- juce_core/streams/juce_FileInputSource.h

Inheritance diagram for juce::FileInputSource:

## Public Member Functions

| FileInputSource (const File &file, bool useFileTimeInHashGeneration=false)
| Creates a FileInputSource for a file.
| ~FileInputSource () override
| Destructor.
InputStream * | createInputStream () override
| Returns a new InputStream to read this item.
InputStream * | createInputStreamFor (const String &relatedItemPath) override
| Returns a new InputStream to read an item, relative.
int64 | hashCode () const override
| Returns a hash code that uniquely represents this item.
Public Member Functions inherited from juce::InputSource
| InputSource ()=default
virtual | ~InputSource ()=default
| Destructor.

## Constructors and Destructors

## FileInputSource()

juce::FileInputSource::FileInputSource | ( | const File & | file,
|  | bool | useFileTimeInHashGeneration = false )

Creates a FileInputSource for a file.

If the useFileTimeInHashGeneration parameter is true, then this object's hashCode() method will incorporate the file time into its hash code; if false, only the file name will be used for the hash.

Referenced by hashCode().

## ~FileInputSource()

juce::FileInputSource::~FileInputSource | ( |  | ) |

override

Destructor.

## Member Functions

## createInputStream()

InputStream * juce::FileInputSource::createInputStream | ( |  | ) |

override virtual

Returns a new InputStream to read this item.

Returns
  an inputstream that the caller will delete, or nullptr if the filename isn't found.

Implements juce::InputSource.

## createInputStreamFor()

InputStream * juce::FileInputSource::createInputStreamFor | ( | const String & | relatedItemPath | ) |

override virtual

Returns a new InputStream to read an item, relative.

Parameters

  relatedItemPath | the relative pathname of the resource that is required

Returns
  an inputstream that the caller will delete, or nullptr if the item isn't found.

Implements juce::InputSource.

## hashCode()

int64 juce::FileInputSource::hashCode | ( |  | ) | const

override virtual

Returns a hash code that uniquely represents this item.

Implements juce::InputSource.

References FileInputSource().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited