Class: ItunesController::FileCommand

Inherits:
ServerCommand show all
Defined in:
lib/itunesController/controllserver.rb

Overview

The file command is used to tell the server about files that should be worked on. These files are the path as they are found on the server. This command takes the format FILE:<filename>

Instance Attribute Summary

Attributes inherited from ServerCommand

#name, #requiredLoginState, #singleThreaded

Instance Method Summary collapse

Methods inherited from ServerCommand

#executeSingleThreaded, #processLine

Constructor Details

#initialize(state, itunes) ⇒ FileCommand

The constructor

Parameters:



390
391
392
# File 'lib/itunesController/controllserver.rb', line 390

def initialize(state,itunes)
    super(ItunesController::CommandName::FILE,ServerState::AUTHED,false,state,itunes)
end

Instance Method Details

#processData(line, io) ⇒ Object



394
395
396
397
398
399
400
# File 'lib/itunesController/controllserver.rb', line 394

def processData(line,io)
    if (line =~ /^\:(.+)$/)
        @state.files.push($1)
        return true, "220 ok\r\n"
    end            
    return true, "503 ERROR expected file\r\n"
end