Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

J_E_Mc

Members
  • Content Count

    2
  • Joined

  • Last visited

Reputation Activity

  1. Upvote
    J_E_Mc reacted to payonel in filesystem.read is returning 2048 character strings   
    local fs = component.proxy(component.list("filesystem")()) local handle = fs.open("init.lua") local buffer = {} repeat local data = fs.read(handle, math.huge) table.insert(buffer, data) until not data fs.close(handle) local entire_contents_of_file = table.concat(buffer) stream handles naturally don't returns ALL of what you ask for, it can take multiple reads. read returns nil when the stream has ended (e.g. eof)
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.