문제

a=Net::FTP.open('path', 'username','password')
a.chdir('any name of directory')

But how to visit the parent directory from a.pwd()

도움이 되었습니까?

해결책

Use a.chdir('..') to change to the parent directory if the host platform supports it (pretty much all platforms should) or use a.sendcmd('CDUP') to change to the parent directory in a platform-agnostic way.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top