flagflag  
  
Cur: 2021-07-29 (Thu) 14:28:32 iseki source
Line 1: Line 1:
 +*** File Storage Class [#d0e8dc19]
 +**** class file_storage [#yd2cad53]
 +- lib/filestorage/file_storage.php
 +
 +- array get_area_files($contextid, $component, $filearea, $itemid=false, $sort="itemid, filepath, filename", $includedirs=true);
 +- bool delete_area_files($contextid, $component = false, $filearea = false, $itemid = false);
 +#br
 +
 +**** get_file_storage() [#jea0bc0f]
 +- lib/moodlelib.php
 +
 +- file_storage クラスのインスタンスを生成
 + $fs = get_file_storage();
 +**** $fs->get_area_files() [#k38d2a71]
 +- 格納ディレクトリの情報オブジェクトの配列を得る.
 +-- ディレクトリが A/B/C/D/ の場合.通常 A はコンテキストID.
 +  $files = $fs->get_area_files(A, B, C, D);
 +-- 使用例
 + $files = $fs->get_area_files($context->id, 'mod_altwiki', 'attachments', $resourceid);
 +
 +- 格納ファイルの名前を得る.ただし,カレントディレクトリ '.' を含む.
 + foreach ($files as $file) {
 +     echo $file->get_name();
 + }
 +#br
  

  • Backup diff of Moodle/Programming/File Storage(No. All)
    • Cur: 2021-07-29 (Thu) 14:28:32 iseki

Front page   New List of Pages Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom)

Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthMar 2026Next Month
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
Today

Who's Online

146 user(s) are online (5 user(s) are browsing xpwiki)

Members: 0
Guests: 146

more...

Access Counter

Today : 1041310413104131041310413
Yesterday : 4215442154421544215442154
Total : 5062801450628014506280145062801450628014506280145062801450628014
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com