Commit 1eed2ec 1 parent 99e6ee8 commit 1eed2ec Copy full SHA for 1eed2ec
File tree 13 files changed +144
-0
lines changed
13 files changed +144
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php if (!extension_loaded ("phdfs " )) print "skip " ; ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ try {
4
+ $ obj = new phdfs ();
5
+ $ obj ->port = "9000 " ;
6
+ $ obj ->ip = "127.0.0.1 " ;
7
+ $ log = $ obj ->connect ();
8
+ } catch (Exception $ ex ) {
9
+ var_dump ($ ex ->getMessage ());
10
+ }
11
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ try {
4
+ $ obj = new phdfs ();
5
+ $ obj ->port = "9000 " ;
6
+ $ obj ->ip = "127.0.0.1 " ;
7
+ $ obj ->connect ();
8
+ $ log = $ obj ->copy ('/test.txt ' ,'/test1.txt ' );
9
+ } catch (Exception $ ex ) {
10
+ var_dump ($ ex ->getMessage ());
11
+ }
12
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ try {
4
+ $ obj = new phdfs ();
5
+ $ obj ->port = "9000 " ;
6
+ $ obj ->ip = "127.0.0.1 " ;
7
+ $ obj ->connect ();
8
+ $ log = $ obj ->create_directory ('/a/b/c/ ' );
9
+ } catch (Exception $ ex ) {
10
+ var_dump ($ ex ->getMessage ());
11
+ }
12
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ try {
4
+ $ obj = new phdfs ();
5
+ $ obj ->port = "9000 " ;
6
+ $ obj ->ip = "127.0.0.1 " ;
7
+ $ obj ->connect ();
8
+ $ log = $ obj ->delete ('/test.txt ' );
9
+ } catch (Exception $ ex ) {
10
+ var_dump ($ ex ->getMessage ());
11
+ }
12
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ try {
4
+ $ obj = new phdfs ();
5
+ $ obj ->port = "9000 " ;
6
+ $ obj ->ip = "127.0.0.1 " ;
7
+ $ obj ->connect ();
8
+ $ log = $ obj ->disconnect ();
9
+ } catch (Exception $ ex ) {
10
+ var_dump ($ ex ->getMessage ());
11
+ }
12
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ try {
4
+ $ obj = new phdfs ();
5
+ $ obj ->port = "9000 " ;
6
+ $ obj ->ip = "127.0.0.1 " ;
7
+ $ obj ->connect ();
8
+ $ log = $ obj ->exists ('/test.txt ' );
9
+ } catch (Exception $ ex ) {
10
+ var_dump ($ ex ->getMessage ());
11
+ }
12
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ try {
4
+ $ obj = new phdfs ();
5
+ $ obj ->port = "9000 " ;
6
+ $ obj ->ip = "127.0.0.1 " ;
7
+ $ obj ->connect ();
8
+ $ log = $ obj ->file_info ('/test.txt ' );
9
+ } catch (Exception $ ex ) {
10
+ var_dump ($ ex ->getMessage ());
11
+ }
12
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ try {
4
+ $ obj = new phdfs ();
5
+ $ obj ->port = "9000 " ;
6
+ $ obj ->ip = "127.0.0.1 " ;
7
+ $ obj ->connect ();
8
+ $ log = $ obj ->list_directory ('/ ' );
9
+ } catch (Exception $ ex ) {
10
+ var_dump ($ ex ->getMessage ());
11
+ }
12
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ try {
4
+ $ obj = new phdfs ();
5
+ $ obj ->port = "9000 " ;
6
+ $ obj ->ip = "127.0.0.1 " ;
7
+ $ obj ->connect ();
8
+ $ log = $ obj ->read ('/test.txt ' ,1024 );
9
+ } catch (Exception $ ex ) {
10
+ var_dump ($ ex ->getMessage ());
11
+ }
12
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ try {
4
+ $ obj = new phdfs ();
5
+ $ obj ->port = "9000 " ;
6
+ $ obj ->ip = "127.0.0.1 " ;
7
+ $ obj ->connect ();
8
+ $ log = $ obj ->rename ('/test.txt ' ,'/test_new.txt ' );
9
+ } catch (Exception $ ex ) {
10
+ var_dump ($ ex ->getMessage ());
11
+ }
12
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ try {
4
+ $ obj = new phdfs ();
5
+ $ obj ->port = "9000 " ;
6
+ $ obj ->ip = "127.0.0.1 " ;
7
+ $ obj ->connect ();
8
+ $ log = $ obj ->tell ('/test.txt ' );
9
+ } catch (Exception $ ex ) {
10
+ var_dump ($ ex ->getMessage ());
11
+ }
12
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ try {
4
+ $ obj = new phdfs ();
5
+ $ obj ->port = "9000 " ;
6
+ $ obj ->ip = "127.0.0.1 " ;
7
+ $ obj ->connect ();
8
+ $ log = $ obj ->write ('/test.txt ' ,'hello world ' );
9
+ } catch (Exception $ ex ) {
10
+ var_dump ($ ex ->getMessage ());
11
+ }
12
+ ?>
You can’t perform that action at this time.
0 commit comments