From 656250dd1ffa6a7f6d46697359fda70c259a0a26 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 27 Dec 2011 02:24:27 +0000 Subject: [PATCH] Added/tweaked some FileBackend function comments --- includes/filerepo/backend/FileBackend.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/includes/filerepo/backend/FileBackend.php b/includes/filerepo/backend/FileBackend.php index 23035a43ec..c3c81412d7 100644 --- a/includes/filerepo/backend/FileBackend.php +++ b/includes/filerepo/backend/FileBackend.php @@ -16,7 +16,8 @@ * * FS-based backends are somewhat more restrictive due to the existence of real * directory files; a regular file cannot have the same name as a directory. Other - * backends with virtual directories may not have this limitation. + * backends with virtual directories may not have this limitation. Callers should + * store files in such a way that no files and directories under the same path. * * Methods should avoid throwing exceptions at all costs. * As a corollary, external dependencies should be kept to a minimum. @@ -895,11 +896,11 @@ abstract class FileBackend extends FileBackendBase { } /** - * Validate a container name. - * Null is returned if the name has illegal characters. + * Check if a container name is valid. + * This checks for for length and illegal characters. * * @param $container string - * @return bool + * @return bool */ final protected static function isValidContainerName( $container ) { // This accounts for Swift and S3 restrictions. Also note @@ -991,8 +992,9 @@ abstract class FileBackend extends FileBackendBase { /** * Resolve a relative storage path, checking if it's allowed by the backend. - * This is intended for internal use, such as encoding illegal chars - * or perhaps getting absolute paths (e.g. FS based backends). + * This is intended for internal use, such as encoding illegal chars or perhaps + * getting absolute paths (e.g. FS based backends). Note that the relative path + * may be the empty string (e.g. the path is simply to the container). * * @param $container string Container the path is relative to * @param $relStoragePath string Relative storage path -- 2.20.1