Permalink
Browse files

Merge pull request #4 from nebiros/master

New php function: sys_get_temp_dir()
  • Loading branch information...
2 parents 1c79396 + b5c9f62 commit bac4c712a76fe1811b19cd442d267a8836c328f7 @mnaberez mnaberez committed Feb 9, 2012
Showing with 25 additions and 1 deletion.
  1. +1 −1 filesystem/is_dir.markdown
  2. +24 −0 filesystem/sys_get_temp_dir.markdown
@@ -9,7 +9,7 @@
{{code:ruby
is_dir = File.directory?('/path/to/foobar')
- var_export(is_dir)
+ p is_dir
#=> true
}}
@@ -0,0 +1,24 @@
+# sys_get_temp_dir
+
+Returns directory path used for temporary files.
+
+{{code:php
+ $tmp = sys_get_temp_dir();
+ var_export($tmp);
+
+ //=> '/tmp'
+}}
+
+{{code:ruby
+ require 'tmpdir'
+ tmp = Dir.tmpdir
+ p tmp
+
+ #=> "/tmp"
+}}
+
+{{related:
+ filesystem/basename
+ filesystem/dirname
+ filesystem/pathinfo
+}}

0 comments on commit bac4c71

Please sign in to comment.