Class File

Concrete\Core\File\File implements Concrete\Core\Permission\ObjectInterface
Namespace: Concrete\Core\File
Entity
Table(name="files")
Located at src/File/File.php

Methods summary

public
public static Concrete\Core\File\File
# getByID( integer $fID )

returns a file object for the given file ID

public
# __call( $nm, $a )

For all methods that file does not implement, we pass through to the currently active file version object

public
public
public
public
public
public
public Concrete\Core\File\StorageLocation\StorageLocation
public Concrete\Core\File\Version[]
public
# reindex( )

Reindex the attributes on this file.

public static
protected
# save( )
public
public
# setPassword( $pw )
public
# setOriginalPage( $ocID )
public
public
public
# resetPermissions( $fOverrideSetPermissions = 0 )
public
public
# setUserID( $uID )
public
public
# isStarred( $u = false )
public
public
# getVersionToModify( $forceCreateNew = false )

Returns a file version object that is to be written to. Computes whether we can use the current most recent version, OR a new one should be created

public
public
public static
# add( $filename, $prefix, $data = array(), $fsl = false )
public
public
# inFileSet( $fs )
public
# delete( )

Removes a file, including all of its versions

public Concrete\Core\File\Version
# getRecentVersion( )

returns the most recent FileVersion object

public Concrete\Core\File\Version
# getVersion( integer $fvID = null )

returns the FileVersion object for the provided fvID if none provided returns the approved version

public
# getVersionList( )

Returns an array of all FileVersion objects owned by this file

public
public
# getDownloadStatistics( $limit = 20 )
public
# trackDownload( integer $rcID = null )

Tracks File Download, takes the cID of the page that the file was downloaded from

public
# isError( )

Constants summary

integer CREATE_NEW_VERSION_THRESHOLD
# 300

Properties summary

protected $fID
#
protected $fDateAdded
# null
protected $fPassword
#
protected $versions
#
protected boolean $fOverrideSetPermissions
# false
protected integer $ocID

Originally placed on which page.

# 0
protected integer $uID
# 0
protected $storageLocation
#