FOSSology  4.4.0
Open Source License Compliance by Open Source Software
common-repo.php File Reference

This file contains common repository functions. More...

Go to the source code of this file.

Functions

 GetMimeType ($Item)
 Given an uploadtree_pk, return a string that describes the mime type. More...
 
 RepPath ($PfilePk, $Repo="files")
 Given a pfile id, retrieve the pfile path. More...
 
 RepPathItem ($Item, $Repo="files")
 Given an uploadtree_pk, retrieve the pfile path. More...
 

Detailed Description

This file contains common repository functions.

Definition in file common-repo.php.

Function Documentation

◆ GetMimeType()

GetMimeType (   $Item)

Given an uploadtree_pk, return a string that describes the mime type.

Note
this only looks in the pfile rec. For some mimetypes unpack initializes the pfile mimetype. Others require the mimetype agent. (This is in common-repo since mimetypes apply to repo contents.)
Parameters
int$ItemUploadtree pk
Returns
String that describes the mime type.

Definition at line 25 of file common-repo.php.

◆ RepPath()

RepPath (   $PfilePk,
  $Repo = "files" 
)

Given a pfile id, retrieve the pfile path.

Note
The filename at the path may not exist. In fact, the entire path may not exist!
Parameters
int$PfilePkPfile pk
string$RepoRepository type
Returns
The path, or NULL if the pfile record does not exist.

Definition at line 58 of file common-repo.php.

◆ RepPathItem()

RepPathItem (   $Item,
  $Repo = "files" 
)

Given an uploadtree_pk, retrieve the pfile path.

Note
The filename at the path may not exist. In fact, the entire path may not exist!
Parameters
int$ItemUploadtree pk
string$RepoRepository type
Returns
The path, or NULL if the pfile record does not exist.

Definition at line 91 of file common-repo.php.