Permalink
Browse files

[enhance] file: added mkdir function

  • Loading branch information...
1 parent 23a3bda commit b6e4c87d6e86380be8f0d995f80369ae5d1d7de3 @Aqua-Ye Aqua-Ye committed Sep 13, 2012
Showing with 10 additions and 2 deletions.
  1. +1 −1 CHANGELOG
  2. +9 −1 lib/stdlib/io/file/file.opa
View
@@ -2,7 +2,7 @@ Updated APIs:
* File:
- depreacted `content` and `content_opt`, replaced by `read` and `read_opt`
- - added `write` function
+ - added `write` and `mkdir` function
2012.09.10, Version 1.0.6 (stable), v3375
@@ -1,5 +1,5 @@
/*
- Copyright © 2011, 2012 MLstate
+ Copyright © 2011, 2012 MLstate
This file is part of Opa.
@@ -71,6 +71,14 @@ File = {{
write(path, content) = %% BslFile.write %%(path, content)
/**
+ * Create a directory
+ *
+ * @param path The path of the directory
+ * @return true if creation successful
+ */
+ mkdir(path) = %% BslFile.make_dir %%(path)
+
+ /**
* Check the existence of a file
*
* @param path The path of the file to check

0 comments on commit b6e4c87

Please sign in to comment.