Index: trunk/phase3/includes/filerepo/backend/FileBackend.php |
— | — | @@ -16,7 +16,8 @@ |
17 | 17 | * |
18 | 18 | * FS-based backends are somewhat more restrictive due to the existence of real |
19 | 19 | * directory files; a regular file cannot have the same name as a directory. Other |
20 | | - * backends with virtual directories may not have this limitation. |
| 20 | + * backends with virtual directories may not have this limitation. Callers should |
| 21 | + * store files in such a way that no files and directories under the same path. |
21 | 22 | * |
22 | 23 | * Methods should avoid throwing exceptions at all costs. |
23 | 24 | * As a corollary, external dependencies should be kept to a minimum. |
— | — | @@ -895,11 +896,11 @@ |
896 | 897 | } |
897 | 898 | |
898 | 899 | /** |
899 | | - * Validate a container name. |
900 | | - * Null is returned if the name has illegal characters. |
| 900 | + * Check if a container name is valid. |
| 901 | + * This checks for for length and illegal characters. |
901 | 902 | * |
902 | 903 | * @param $container string |
903 | | - * @return bool |
| 904 | + * @return bool |
904 | 905 | */ |
905 | 906 | final protected static function isValidContainerName( $container ) { |
906 | 907 | // This accounts for Swift and S3 restrictions. Also note |
— | — | @@ -991,8 +992,9 @@ |
992 | 993 | |
993 | 994 | /** |
994 | 995 | * Resolve a relative storage path, checking if it's allowed by the backend. |
995 | | - * This is intended for internal use, such as encoding illegal chars |
996 | | - * or perhaps getting absolute paths (e.g. FS based backends). |
| 996 | + * This is intended for internal use, such as encoding illegal chars or perhaps |
| 997 | + * getting absolute paths (e.g. FS based backends). Note that the relative path |
| 998 | + * may be the empty string (e.g. the path is simply to the container). |
997 | 999 | * |
998 | 1000 | * @param $container string Container the path is relative to |
999 | 1001 | * @param $relStoragePath string Relative storage path |