code/Controller/AssetAdminFile.php
public function getFilesInUse()
    {
        $list = ArrayList::create();

        // Check SiteTreeFileExtension
        if ($this->owner instanceof Folder) {
            // Join on tracking table
            $parents = static::nestedFolderIDs($this->owner->ID);
            $linkQuery = FileLink::get()->sql($linkParams);
            $list = File::get()->filter('ParentID', $parents)
                ->innerJoin(
                    "({$linkQuery})",
                    '"File"."ID" = "FileLinkTracking"."LinkedID"',
                    'FileLinkTracking',
                    20,
                    $linkParams
                );
        }

        // Allow extension
        $this->owner->extend('updateFilesInUse', $list);
        return $list;
    }
public function getFilesInUse()
    {
        $list = ArrayList::create();

        // Check SiteTreeFileExtension
        if ($this->owner instanceof Folder) {
            // Join on tracking table
            $parents = static::nestedFolderIDs($this->owner->ID);
            $linkQuery = FileLink::get()->sql($linkParams);
            $list = File::get()->filter('ParentID', $parents)
                ->innerJoin(
                    "({$linkQuery})",
                    '"File"."ID" = "FileLinkTracking"."LinkedID"',
                    'FileLinkTracking',
                    20,
                    $linkParams
                );
        }

        // Allow extension
        $this->owner->extend('updateFilesInUse', $list);
        return $list;
    }
public function getFilesInUse ( ) { $ list = ArrayList :: create ( ) ; // Check SiteTreeFileExtension if ( $ this -> owner instanceof Folder ) { // Join on tracking table $ parents = static :: nestedFolderIDs ( $ this -> owner -> ID ) ; $ linkQuery = FileLink :: get ( ) -> sql ( $ linkParams ) ; $ list = File :: get ( ) -> filter ( 'ParentID' , $ parents ) -> innerJoin ( "({$linkQuery})" , '"File"."ID" = "FileLinkTracking"."LinkedID"' , 'FileLinkTracking' , 20 , $ linkParams ) ; } // Allow extension $ this -> owner -> extend ( 'updateFilesInUse' , $ list ) ; return $ list ; }
Get the list of all nested files in use

@return SS_List
Get the list of all nested files in use