⧼vector-jumptocontent⧽

API:EPrints/Platform: Difference between revisions

From EPrints Documentation
No edit summary
Added page to state it is many deprecated and point at EPrints::BackCompatibility
Tag: Replaced
 
Line 1: Line 1:
<!-- Pod2Wiki=_preamble_
{{API}}{{Pod2Wiki}}[[Category:API|PLATFORM]]
This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
-->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/Platform.pm|package_name=EPrints::Platform}}[[Category:API|PLATFORM]][[Category:API:EPrints/Platform|PLATFORM]]<div><!-- Edit below this comment -->


 
This class has been predominantly deprecated and replaced by '''[[API:EPrints/System|EPrints::System]]'''.  See '''[[API:EPrints/BackCompatibility|EPrints::BackCompatibility]]''' for more details.
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
==NAME==
'''EPrints::Platform''' - handles platform specific code.
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=head_description -->
==DESCRIPTION==
When you call a method in this class, it is sent to the appropriate EPrints::Platform::xxx module. Usually this is  EPrints::Platform::Unix
 
Which module is used is configured by the {platform} setting in SystemSettings.pm
 
All file and directory names are absolute and joined by the Unix file separator character '/'.
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=item_chmod -->
===chmod( MODE, @filelist )===
 
Change the access control on files listed in @filelist to MODE.
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=item_chown -->
===chown( $uid, $gid, @filelist )===
 
Change the user and group on files listed in @filelist to $uid and $gid. $uid and $gid are as returned by {{API:PodLink|file=getpwnam|package_name=getpwnam|section=|text=getpwnam}} (usually numeric).
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=item_getpwnam -->
===getpwnam( $user )===
 
Return the login-name, password crypt, uid and gid for user $user.
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=item_getpwnam -->
===getpwnam( $user )===
 
Return the login-name, password crypt, uid and gid for user $user.
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=item_test_uid -->
===test_uid()===
 
Test whether the current user is the same that is configured in SystemSettings.
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=item_mkdir -->
===mkdir( $path, MODE )===
 
Create a directory $path (including parent directories as necessary) set to mode MODE. If MODE is undefined defaults to dir_perms in SystemSettings.
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=item_exec -->
===exec()===
 
Executes certain named tasks, which were once (and may be) handled by external binaries. This allows a per-platform solution to each task. (example is unpacking a .tar.gz file).
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=item_read_perl_script -->
===$rc = read_perl_script( $repository, $filename, @args )===
 
Executes Perl with @args, including the current EPrints library path. Writes output from the script to $filename (errors and stdout).
 
Returns 0 on success.
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=item_get_hash_name -->
===get_hash_name()===
 
Returns the last part of the filename of the hashfile for a document. (yes, it's a bad function name.)
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=item_free_space -->
===free_space( $dir )===
 
Return the amount of free space (in bytes) available at $dir. $dir may contain a drive (C:) on Windows platforms.
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=item_proc_exists -->
===$bool = proc_exists( $pid )===
 
Returns true if a process exists using id $pid.
 
Returns undef if process identification is unsupported.
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<!-- Edit below this comment -->
 
 
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment -->

Latest revision as of 22:02, 9 January 2022

This class has been predominantly deprecated and replaced by EPrints::System. See EPrints::BackCompatibility for more details.