FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
Common Directory Functions. More...
Go to the source code of this file.
Functions | |
Isdir ($mode) | |
Isartifact ($mode) | |
Iscontainer ($mode) | |
DirMode2String ($Mode) | |
Convert a file mode to string values. More... | |
DirGetNonArtifact ($UploadtreePk, $uploadtree_tablename='uploadtree') | |
Given an artifact directory (uploadtree_pk), return the first non-artifact directory (uploadtree_pk). More... | |
_DirCmp ($a, $b) | |
Compare function for usort() on directory items. More... | |
Dir2Path ($uploadtree_pk, $uploadtree_tablename='uploadtree') | |
Return the path (without artifacts) of an uploadtree_pk. More... | |
Dir2Browse ($Mod, $UploadtreePk, $LinkLast=NULL, $ShowBox=1, $ShowMicro=NULL, $Enumerate=-1, $PreText='', $PostText='', $uploadtree_tablename="uploadtree") | |
Get an html linked string of a file browse path. More... | |
Dir2BrowseUpload ($Mod, $UploadPk, $LinkLast=NULL, $ShowBox=1, $ShowMicro=NULL, $uploadtree_tablename='uploadtree') | |
Get an html links string of a file browse path. More... | |
Dir2FileList (&$Listing, $IfDirPlugin, $IfFilePlugin, $Count=-1, $ShowPhrase=0) | |
Given an array of pfiles/uploadtree, sorted by pfile, list all of the breadcrumbs for each file. If the pfile is a duplicate, then indent it. More... | |
UploadtreeFileList ($Listing, $IfDirPlugin, $IfFilePlugin, $Count=-1, $ShowPhrase=0) | |
Given an array of pfiles/uploadtree, sorted by pfile, list all of the breadcrumbs for each file. If the pfile is a duplicate, then indent it. More... | |
Variables | |
$DirGetNonArtifact_Prepared =0 | |
Common Directory Functions.
Definition in file common-dir.php.
_DirCmp | ( | $a, | |
$b | |||
) |
Compare function for usort() on directory items.
$a | $b to compare |
Definition at line 205 of file common-dir.php.
Dir2Browse | ( | $Mod, | |
$UploadtreePk, | |||
$LinkLast = NULL , |
|||
$ShowBox = 1 , |
|||
$ShowMicro = NULL , |
|||
$Enumerate = -1 , |
|||
$PreText = '' , |
|||
$PostText = '' , |
|||
$uploadtree_tablename = "uploadtree" |
|||
) |
Get an html linked string of a file browse path.
string | $Mod | Module name (e.g. "browse") |
int | $UploadtreePk | |
string | $LinkLast | Create link (a href) for last item and use LinkLast as the module name |
bool | $ShowBox | True to draw a box around the string |
bool | $ShowMicro | True to show micro menu |
int | $Enumerate | If >= zero number the folder/file path (the stuff in the yellow bar) starting with the value $Enumerate |
string | $PreText | Optional additional text to precede the folder path |
string | $PostText | Optional text to follow the folder path |
string | $uploadtree_tablename |
Definition at line 263 of file common-dir.php.
Dir2BrowseUpload | ( | $Mod, | |
$UploadPk, | |||
$LinkLast = NULL , |
|||
$ShowBox = 1 , |
|||
$ShowMicro = NULL , |
|||
$uploadtree_tablename = 'uploadtree' |
|||
) |
Get an html links string of a file browse path.
This calls Dir2Browse().
string | $Mod | Module name (e.g. "browse") |
int | $UploadPk | Upload to browse |
string | $LinkLast | Create link (a href) for last item and use LinkLast as the module name |
bool | $ShowBox | Draw a box around the string (default true) |
bool | $ShowMicro | Show micro menu (default false) |
string | $uploadtree_tablename |
Definition at line 374 of file common-dir.php.
Dir2FileList | ( | & | $Listing, |
$IfDirPlugin, | |||
$IfFilePlugin, | |||
$Count = -1 , |
|||
$ShowPhrase = 0 |
|||
) |
Given an array of pfiles/uploadtree, sorted by pfile, list all of the breadcrumbs for each file. If the pfile is a duplicate, then indent it.
array | &$Listing | Array from a database selection. The SQL query should use "ORDER BY pfile_fk" so that the listing can indent duplicate pfiles |
string | $IfDirPlugin | Plugin name to use if this is a directory or any other container |
string | $IfFilePlugin | Plugin name to use if this is a file |
int | $Count | First number for indexing the entries (may be -1 for no count) |
int | $ShowPhrase | Obsolete from bsam |
Definition at line 403 of file common-dir.php.
Dir2Path | ( | $uploadtree_pk, | |
$uploadtree_tablename = 'uploadtree' |
|||
) |
Return the path (without artifacts) of an uploadtree_pk.
int | $uploadtree_pk | |
string | $uploadtree_tablename |
Definition at line 222 of file common-dir.php.
DirGetNonArtifact | ( | $UploadtreePk, | |
$uploadtree_tablename = 'uploadtree' |
|||
) |
Given an artifact directory (uploadtree_pk), return the first non-artifact directory (uploadtree_pk).
int | $UploadtreePk | Uploadtree_pk |
string | $uploadtree_tablename | Defaults to 'uploadtree' to not break bsam/ui |
Definition at line 158 of file common-dir.php.
DirMode2String | ( | $Mode | ) |
Convert a file mode to string values.
int | $Mode | File mode (as octal integer) |
Definition at line 50 of file common-dir.php.
Isartifact | ( | $mode | ) |
Check if the mode denotes artifact (a file)
int | $mode | File mode (as octal integer) |
Definition at line 29 of file common-dir.php.
Iscontainer | ( | $mode | ) |
Check if the mode denotes container (fossology folder)
int | $mode | File mode (as octal integer) |
Definition at line 38 of file common-dir.php.
Isdir | ( | $mode | ) |
Check if the mode denotes directory
int | $mode | File mode (as octal integer) |
Definition at line 20 of file common-dir.php.
UploadtreeFileList | ( | $Listing, | |
$IfDirPlugin, | |||
$IfFilePlugin, | |||
$Count = -1 , |
|||
$ShowPhrase = 0 |
|||
) |
Given an array of pfiles/uploadtree, sorted by pfile, list all of the breadcrumbs for each file. If the pfile is a duplicate, then indent it.
array | $Listing | Array from a database selection. The SQL query should use "ORDER BY pfile_fk" so that the listing can indent duplicate pfiles |
string | $IfDirPlugin | Plugin name to use if this is a directory or any other container |
string | $IfFilePlugin | Plugin name to use if this is a file |
int | $Count | First number for indexing the entries (may be -1 for no count) |
int | $ShowPhrase | Obsolete from bsam |
Definition at line 454 of file common-dir.php.