Joomla CMS  3.8.5 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.8.5 et du framework Joomla Platform intégré
Référence de la classe JPath

Fonctions membres publiques statiques

static canChmod ($path)
 
static setPermissions ($path, $filemode='0644', $foldermode='0755')
 
static getPermissions ($path)
 
static check ($path)
 
static clean ($path, $ds=DIRECTORY_SEPARATOR)
 
static isOwner ($path)
 
static find ($paths, $file)
 

Description détaillée

A Path handling class

Depuis
11.1

Documentation des fonctions membres

◆ canChmod()

static canChmod (   $path)
static

Checks if a path's permissions can be changed.

Paramètres
string$pathPath to check.
Renvoie
boolean True if path can have mode changed.
Depuis
11.1

Références $path.

Référencé par JFilesystemWrapperPath\canChmod().

◆ check()

static check (   $path)
static

Checks for snooping outside of the file system root.

Paramètres
string$pathA file system path to check.
Renvoie
string A cleaned version of the path or exit on error.
Depuis
11.1
Exceptions
Exception

Références $path, et JPATH_ROOT.

Référencé par BaseController\addPath(), JFilesystemWrapperPath\check(), TemplatesModelTemplate\getSource(), JHtmlUsers\image(), FOFIntegrationJoomlaFilesystem\pathCheck(), et ConfigModelComponent\populateState().

◆ clean()

static clean (   $path,
  $ds = DIRECTORY_SEPARATOR 
)
static

Function to strip additional / or \ in a path name.

Paramètres
string$pathThe path to clean.
string$dsDirectory separator (optional).
Renvoie
string The cleaned path.
Depuis
11.1
Exceptions
UnexpectedValueException

Références $path, elseif, et JPATH_ROOT.

Référencé par JFormFieldSubform\__set(), HtmlView\_addPath(), InstallerModelInstall\_getPackageFromFolder(), BaseDatabaseModel\addIncludePath(), CacheController\addIncludePath(), CacheStorage\addIncludePath(), Cache\addIncludePath(), HTMLHelper\addIncludePath(), CategoriesHelper\addSubmenu(), TagsHelper\addSubmenu(), FieldsHelper\addSubmenu(), FieldsViewField\addToolbar(), FieldsViewGroup\addToolbar(), FieldsViewGroups\addToolbar(), FieldsViewFields\addToolbar(), JFile\append(), JFilesystemWrapperPath\clean(), InstallerHelper\cleanupInstall(), TemplatesModelTemplate\compileLess(), TemplatesModelTemplate\copy(), TemplatesModelTemplate\copyFile(), Installer\copyFiles(), TagsModelTags\countItems(), CategoriesModelCategories\countItems(), MediaControllerFolder\create(), InstallationModelConfiguration\createConfiguration(), TemplatesModelTemplate\createFile(), TemplatesModelTemplate\createFolder(), TemplatesModelTemplate\createOverride(), JoomlaupdateModelDefault\createRestorationFile(), TemplatesModelTemplate\cropImage(), MediaControllerFolder\delete(), MediaControllerFile\delete(), TemplatesModelTemplate\deleteFile(), TemplatesModelTemplate\deleteFolder(), InstallationControllerRemovefolder\execute(), FieldsHelper\extract(), JArchiveTar\extract(), TemplatesModelTemplate\extractArchive(), JArchiveZip\extractCustom(), TemplatesModelTemplate\getArchive(), LibraryAdapter\getElement(), FileAdapter\getElement(), TemplatesModelTemplate\getFiles(), TemplatesModelTemplate\getFont(), LanguagesModelOverride\getForm(), TemplatesModelTemplate\getImage(), JFormFieldModulelayout\getInput(), JFormFieldComponentlayout\getInput(), PluginsModelPlugin\getItem(), TemplatesModelStyle\getItem(), ModulesModelModule\getItem(), ModulesModelPositions\getItems(), ModulesModelSelect\getItems(), MediaModelList\getList(), JFormFieldAliastag\getOptions(), JFormFieldFieldcontexts\getOptions(), JFormFieldFolderList\getOptions(), JFormFieldFileList\getOptions(), TemplatesModelTemplate\getOverridesList(), JViewHtml\getPath(), ConfigModelModules\getPositions(), TemplatesHelper\getPositions(), ContenthistoryHelper\loadLanguageFiles(), PlgSystemLanguageFilter\onAfterDispatch(), Installer\parseMedia(), PluginsHelper\parseXMLTemplateFile(), TemplatesHelper\parseXMLTemplateFile(), FOFIntegrationJoomlaFilesystem\pathClean(), FileAdapter\populateFilesAndFolderList(), ConfigModelComponent\populateState(), ConfigModelModules\preprocessForm(), ConfigModelTemplates\preprocessForm(), FieldsModelGroup\preprocessForm(), PluginsModelPlugin\preprocessForm(), CategoriesModelCategory\preprocessForm(), TemplatesModelStyle\preprocessForm(), ModulesModelModule\preprocessForm(), FieldsModelField\preprocessForm(), MenusModelItem\preprocessForm(), LanguagesModelStrings\refresh(), TemplatesModelTemplate\renameFile(), TemplatesModelTemplate\resizeImage(), TemplatesModelTemplate\save(), ComponentAdapter\setupInstallPaths(), ComponentAdapter\uninstall(), InstallerHelper\unpack(), MediaControllerFile\upload(), TemplatesModelTemplate\uploadFile(), et JHtmlDebug\xdebuglink().

◆ find()

static find (   $paths,
  $file 
)
static

Searches the directory paths for a given file.

Paramètres
mixed$pathsAn path string or array of path strings to search in
string$fileThe file name to look for.
Renvoie
mixed The full path and file name for the target file, or boolean false if the file is not found in any of the paths.
Depuis
11.1

Références $file, et $path.

Référencé par HTMLHelper\_(), BaseController\createView(), JFilesystemWrapperPath\find(), CacheController\getInstance(), BaseDatabaseModel\getInstance(), Table\getInstance(), FinderViewSearch\getLayoutFile(), JViewHtml\getPath(), FileLayout\getPath(), Toolbar\loadButtonType(), FormHelper\loadClass(), Form\loadFile(), HtmlView\loadHelper(), ConfigViewCmsHtml\loadTemplate(), HtmlView\loadTemplate(), FOFIntegrationJoomlaFilesystem\pathFind(), et MenusModelItem\preprocessForm().

◆ getPermissions()

static getPermissions (   $path)
static

Get the permissions of the file/folder at a given path.

Paramètres
string$pathThe path of a file/folder.
Renvoie
string Filesystem permissions.
Depuis
11.1

Références $i, $mode, et $path.

Référencé par JFilesystemWrapperPath\getPermissions(), et TemplatesModelTemplate\save().

◆ isOwner()

static isOwner (   $path)
static

Method to determine if script owns the path.

Paramètres
string$pathPath to check ownership.
Renvoie
boolean True if the php script owns the path passed.
Depuis
11.1

Références $path, $return, $tmp, jimport(), et JPATH_SITE.

Référencé par admin_postinstall_eaccelerator_action(), JFilesystemWrapperPath\isOwner(), TemplatesModelTemplate\save(), et ConfigModelApplication\writeConfigFile().

◆ setPermissions()

static setPermissions (   $path,
  $filemode = '0644',
  $foldermode = '0755' 
)
static

Chmods files and directories recursively to given permissions.

Paramètres
string$pathRoot path to begin changing mode [without trailing slash].
string$filemodeOctal representation of the value to change file mode to [null = no change].
string$foldermodeOctal representation of the value to change folder mode to [null = no change].
Renvoie
boolean True if successful [one fail means the whole operation failed].
Depuis
11.1

Références $file, et $path.

Référencé par admin_postinstall_eaccelerator_action(), TemplatesModelTemplate\save(), JFilesystemWrapperPath\setPermissions(), et ConfigModelApplication\writeConfigFile().


La documentation de cette classe a été générée à partir du fichier suivant :