Vous êtes sur la page 1sur 4

AjaXplorer Driver API v2.7.X => 3.

0
Commons
Common Parameters
get_action
[required] Service differeniaion. !a"icall#$ an# "ervice %ill &e called &# "o'e(in) li*e +
(p+,,(o",aja-plorer,conen.p(p.)e/acion=acion0para'eer"...
dir
1urren locaion in"ide (e repo"ior#$ &e)innin) %i( 2 , 3.
4-a'ple + dir=,'#,folder$ dir=,
file, file_[index]
In 'an# ca"e"$ %e need o pa"" on or 'ore "eleced file". If "elecion i" unique$ pa"" onl# (e 2 file 3
para'eer$ el"e para'eer" are inde-ed auo'aicall# + file/0$ file/5$ file2$ ec. 6alue" are (e full pa( of (e
file in"ide (e repo"ior# 7no onl# (e &a"ena'e of (e file$ even if (e curren locaion i" pa""ed via (e dir
para'eer8.
Example : ?get_action=toto&file/0=,'#,folder,file5.-0file/5=,'#,folder,file2.('l0 ec...
Common Returns
Messages
9(en no e-plicied$ all "ervice" reurn X:; value". <(e roo ele'en i" =ree>. 4-cepion" are convered o
a ='e""a)e #pe=2 4>>?> 3>=,'e""a)e> ele'en$ %(ere a" (e "ucce"" 'e""a)e" are ='e""a)e
#pe=2 S@114SS 3>=,'e""a)e>.
4-a'ple +
<?xml version="1.0" encoding="UTF-8"?>
<tree>
<message type="!!"!">
#mpossi$le de tro%ver le &ic'ier (admin(aaa)8(*00)1*0)-eFly+a$aret,!ecto.gi& in
-.c'arlie.so&t/are.0...1.class.&s2ccess3river.p'p 4l.*056
<(message>
<(tree>
Reload Instructions
In 'an# ca"e"$ (e daa 'anipulaion cau"ed &# (e "ervice" 'a# require a reloadin) of (e curren li"in).
<(e =reload/in"rucion> a) %ill fire "uc( a reloadin) +
<reload7instr%ction
o$8ect=9 data:repository7list ; 0re<%ired= generally 9data;1
node = 9 pat' to node to reload ; 0optional1
&ile = 9 &ile to select a&ter reload ; 0optional1
(>
Example + afer 'ovin) a file$ %e need o &o( ri))er a reload of (e curren folder$ and a reload of (e
de"inaion folder
<?xml version="1.0" encoding="UTF-8"?>
<tree>
<reload7instr%ction o$8ect=9 data ;(>
<reload7instr%ction o$8ect=9 data ; node=9(pat'(to(destination(&older;(>
<(tree>
Basic implementation for a driver : ls listing action.
ls
;i"" all daa c(ildren in"ide a )iven node
dir + cf co''on"
Pa)inaion + pa)e can &e appended o (e dir value afer a A
opion" + [l$ d$ B$ f$ a]
l + li" 'eadaa
d + include direcorie" in li"in)
B + include arc(ive file" in li"in)
f + include file" in li"in)
a + 2 all 3$ equivalen o dBf
>eurn"
If 2 l 3 i" no "e$ 'ini'al ari&ue" are text$ icon, and filename. Cor a folder$ #ou can add openicon and
#ou 'u" add src.
<?xml version="1.0" encoding="UTF-8"?>
<tree &ilename="(c%rrent(pat'" is7&ile="&alse">
<tree
text=">%si<%e"
icon="&older.png"
openicon="&older7open.png"
&ilename="(c%rrent(pat'(>%si<%e"
src="content.p'p?dir=?*Fc%rrent?*Fpat'?*F>%si<%e"
(>
<(tree>
If 2 l 3 i" "e$ (en %e 'u" "end (e li"in) %i( availa&le 'eadaa +
<?xml version="1.0" encoding="UTF-8"?>
<tree &ilename="(c%rrent(pat'" is7&ile="&alse">
<@-- 2 F"A3! -->
<tree
text="tt"
is7&ile="0"
is7image="0"
mimestring="3irectory"
modi&time="1)(1*(*00) 1B-18"
&ilesiCe="-"
&ilename="(c%rrent(pat'(tt"
icon="&older.png"
(>
<@-- 2 F#A -->
<tree
text="mydoc.txt"
is7&ile="1"
is7image="0"
mimestring="Text File"
a8xp7modi&time="1111111" (( A#DUE T#>FT2>G
&ilesiCe="11B.5H I$" (( !232JA F#K
$ytesiCe="1*LM1M" (( +">GUT! F#K
&ilename="(c%rrent(pat'(mydoc.txt"
icon="text*.png"
(>
<@-- 2D #>2N F#A -->
<tree
text="*00)1*0)-eFly+a$aret-!ecto.gi&"
is7&ile="1"
is7image="1"
<@-- #>2N FG+#F#+ 2TT!#JUTF 4needed only i& is7image=16 -->
image7type="image(gi&"
image7/idt'="HLL"
image7'eig't="L8M"
<@-- D3 "F #>2N 2TT!#JUTF -->
mimestring="N#F pict%re"
a8xp7modi&time="1111111" (( A#DUE T#>FT2>G
&ilesiCe="11B.5H I$" (( !232JA F#K
$ytesiCe="1*LM1M" (( +">GUT! F#K
&ilename="(c%rrent(pat'(*00)1*0)-eFly+a$aret-!ecto.gi&"
icon="image.png"
(>
<(tree>
See (e file "erver,conf,conf.e-en"ion".p(p for (e "uppored e-en"ion",icon".
File System ccess actions
DDD !ASI1 E4<,S4<
!pload
Po" a file$ ei(er via (e "andard F<:; uploader or via (e Cla"( uploader
F<:; @ploader
dir + cf. co''on"
u"erfile/[inde-] + 0 o n G/CI;4S daa
Cla"( @ploader
dir + &a"eHI/encoded dir locaion$ call &a"eHI/decode &efore u"e
Ciledaa + unique G/CI;4S daa.
do"nload
<ri))er a &ro%"er do%nload %indo%. If 'uliple file" "eleced and Bip i" ena&led on "erver$ creae" an
arc(ive (en ri))er" do%nload
file "elecion + cf co''on"
get_content
>ead" a file and "end i a" plain e- 7u"ed &# edior"8
file + unique file "elecion $ cf co''on"
p!t_content
Po" a file conen and "ave i in"ide (e file
file + unique file "elecion $ cf co''on"
conen + (e conen o "ave in"ide (e file
encode + [opional] if "e o 2 &a"eHI 3$ (e daa i" pro&a&l# &inar# and i" &a"eHI/encoded.
stat
>erieve &a"ic daa concernin) a file"#"e' node + file or folder$ per'i""ion" and "iBe if iJ" a file.
file + unique file "elecion $ cf co''on"
for'a + KS?L repre"enaion of (e arra# reurned &#
(p+,,%%%.p(p.ne,'anual,en,funcion."a.p(p
DDDD CI;4 :ALIP@;A<I?L
copy # move
1op# or 'ove "elecion
dir + cf. co''on"
file "elecion + cf co''on"
de" + (e de"inaion node
delete
Per'anenl# delee (e "elecion
dir + cf. co''on"
file "elecion + cf co''on"
rename
>ena'e "eleced file
dir + cf co''on"
file + cf co''on"
m$dir
1reae" a folder
dir + cf co''on"
dirna'e + na'e of (e ne% folder
m$file
1reae" an e'p# file. In (e &a"ic driver$ if (e file e-en"ion i" 2 .('l 3$ an e'p# F<:; "*eleon i" %rien
in"ide (e file.
dir + cf. co''on"
filena'e + ne% file
c%mod
1(an)e per'i""ion on file
file "elecion + cf. co''on"
c('od/value + (e value for per'i""ion$ li*e 0777$ 0HII$ ec.
recur"ive + [2 on 3$ 2 off 3] %e(er (i" "(ould &e applied recur"ivel# o c(ildren.
recur/appl#/o + [2 file 3$ 2 dir 3$ 2 &o( 3] If recur"ive$ on %(ic( ie'" o appl#.
DDDD 2 !@SIL4SS 3 ?>I4L<4D
compress
If Bip i" ena&led$ creae" a MIP arc(ive
file "elecion + cf co''on"
arc(ive/na'e + [opional] La'e for (e ne%l# creaed arc(ive
p!&lic_!rl
1reae a pu&lic lin*
file + cf co''on"$ unique "elecion
pa""%ord + a pa""%ord o a"* &efore allo%in) do%nload
e-piraion + 9(en (i" pu&lic lin* e-pire".

Vous aimerez peut-être aussi