Class: Pione::Util::FTPFileSystem

Inherits:
Object
  • Object
show all
Defined in:
lib/pione/util/ftp-server.rb

Direct Known Subclasses

FTPLocalFS, FTPOnMemoryFS

Instance Method Summary collapse

Instance Method Details

#delete_file(path) ⇒ void

This method returns an undefined value.

Delete the file.

Parameters:

  • path (Pathname)

    the path

Raises:

  • (NotImplemented)


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.

Parameters:

  • path (Pathname)

    the path

Returns:

  • (Boolean)

    true if the path is a directory

Raises:

  • (NotImplemented)


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.

Parameters:

  • path (Pathname)

    the path

Returns:

  • (Pathname)

    entry names

Raises:

  • (NotImplemented)


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.

Parameters:

  • path (Pathname)

    the path

Returns:

  • (Boolean)

    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.

Parameters:

  • path (Pathname)

    the path

Returns:

  • (Boolean)

    true if the path is a file

Raises:

  • (NotImplemented)


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.

Parameters:

  • path (Pathname)

    the path

Returns:

  • (String)

    file content

Raises:

  • (NotImplemented)


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.

Parameters:

  • path (Pathname)

    the path

Returns:

  • (Time)

    mtime

Raises:

  • (NotImplemented)


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.

Parameters:

  • path (Pathname)

    the path

Returns:

  • (Integer)

    byte size

Raises:

  • (NotImplemented)


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.

Parameters:

  • path (Pathname)

    the path

Raises:

  • (NotImplemented)


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.

Parameters:

  • from_path (Pathname)

    from path

  • to_path (Pathname)

    to path

Raises:

  • (NotImplemented)


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.

Parameters:

  • path (Pathname)

    the path

  • data (Pathname)

    data file path

Returns:

  • (Integer)

    byte size of the data

Raises:

  • (NotImplemented)


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.

Parameters:

  • path (Pathname)

    the path

Raises:

  • (NotImplemented)


124
125
126
# File 'lib/pione/util/ftp-server.rb', line 124

def rmdir(path)
  raise NotImplemented
end