Class: Pione::Util::FTPFileSystem
- Inherits:
-
Object
- Object
- Pione::Util::FTPFileSystem
- Defined in:
- lib/pione/util/ftp-server.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#delete_file(path) ⇒ void
Delete the file.
-
#directory?(path) ⇒ Boolean
Return true if the path is a directory.
-
#entries(path) ⇒ Pathname
Return entries of the directory.
-
#exist?(path) ⇒ Boolean
Return true if the path is a directory or a file.
-
#file?(path) ⇒ Boolean
Return true if the path is a file.
-
#get_file(path) ⇒ String
Return content of the file.
-
#get_mtime(path) ⇒ Time
Return mtime of the path.
-
#get_size(path) ⇒ Integer
Return byte size of the path.
-
#mkdir(path) ⇒ void
Make a directory at the path.
-
#mv(from_path, to_path) ⇒ void
Move file.
-
#put_file(path, data) ⇒ Integer
Put the data into the path and return the byte size.
-
#rmdir(path) ⇒ void
Delete a directory at the path.
Instance Method Details
#delete_file(path) ⇒ void
This method returns an undefined value.
Delete the file.
76 77 78 |
# File 'lib/pione/util/ftp-server.rb', line 76 def delete_file(path) raise NotImplemented end |
#directory?(path) ⇒ Boolean
Return true if the path is a directory.
35 36 37 |
# File 'lib/pione/util/ftp-server.rb', line 35 def directory?(path) raise NotImplemented end |
#entries(path) ⇒ Pathname
Return entries of the directory.
106 107 108 |
# File 'lib/pione/util/ftp-server.rb', line 106 def entries(path) raise NotImplemented end |
#exist?(path) ⇒ Boolean
Return true if the path is a directory or a file.
25 26 27 |
# File 'lib/pione/util/ftp-server.rb', line 25 def exist?(path) directory?(path) or file?(path) end |
#file?(path) ⇒ Boolean
Return true if the path is a file.
45 46 47 |
# File 'lib/pione/util/ftp-server.rb', line 45 def file?(path) raise NotImplemented end |
#get_file(path) ⇒ String
Return content of the file.
55 56 57 |
# File 'lib/pione/util/ftp-server.rb', line 55 def get_file(path) raise NotImplemented end |
#get_mtime(path) ⇒ Time
Return mtime of the path. If the path doesn't exist, return nil.
96 97 98 |
# File 'lib/pione/util/ftp-server.rb', line 96 def get_mtime(path) raise NotImplemented end |
#get_size(path) ⇒ Integer
Return byte size of the path.
86 87 88 |
# File 'lib/pione/util/ftp-server.rb', line 86 def get_size(path) raise NotImplemented end |
#mkdir(path) ⇒ void
This method returns an undefined value.
Make a directory at the path.
115 116 117 |
# File 'lib/pione/util/ftp-server.rb', line 115 def mkdir(path) raise NotImplemented end |
#mv(from_path, to_path) ⇒ void
This method returns an undefined value.
Move file.
135 136 137 |
# File 'lib/pione/util/ftp-server.rb', line 135 def mv(from_path, to_path) raise NotImplemented end |
#put_file(path, data) ⇒ Integer
Put the data into the path and return the byte size.
67 68 69 |
# File 'lib/pione/util/ftp-server.rb', line 67 def put_file(path, data) raise NotImplemented end |
#rmdir(path) ⇒ void
This method returns an undefined value.
Delete a directory at the path.
124 125 126 |
# File 'lib/pione/util/ftp-server.rb', line 124 def rmdir(path) raise NotImplemented end |