Sha256: 0d7f3fc9a4902f40e49aad6794e97c632032f0fe2ffbf10eb5cd050c290a0fcb

Contents?: true

Size: 716 Bytes

Versions: 1

Compression:

Stored size: 716 Bytes

Contents

= General Usage of the Folio Shell

Require the Folio library.

  require 'folio'

Open a new Folio::Shell object.

  @c = Folio.shell('fixtures')

Method #work returns current working directory.

  @c.work.assert == Folio.dir('fixtures')

Method #to_s returns current working dirname.

  @c.to_s.assert == File.join(Dir.pwd, 'fixtures')

Method #entries returns a list of names of the current directory content.

  @c.entries.sort.assert == ['foo.txt', 'foo_softlink.txt', 'out.txt']

Method #files returns an array of file objects in the current directory.

  f = @c.files.to_a
  f.size.assert == 3
  f.assert.include?(Folio.file('fixtures/foo_softlink.txt'))
  f.assert.include?(Folio.file('fixtures/foo.txt'))


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
folio-0.4.0 spec/shell/general.rd