Skip to content

Instantly share code, notes, and snippets.

@basuke
Created July 20, 2012 16:00
Show Gist options
  • Save basuke/3151547 to your computer and use it in GitHub Desktop.
Save basuke/3151547 to your computer and use it in GitHub Desktop.
file access sample
set t to "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
set t to t & t & t & t & t & t & t & t
set t to t & t & t & t & t & t & t & t
set t to t & t & t & t & t & t & t & t
set t to t & t & t & t & t & t & t & t
set t to t & t & t & t & t & t & t & t
set t to t & t & t & t & t & t & t & t
set thePath to choose file name default name "stupid big data" default location (path to temporary items)
set fp to open for access thePath with write permission
write t to fp
close access fp
set fp to open for access thePath
set t2 to read fp
close access fp
set l to length of t
set l2 to length of t2
{l, l2}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment