Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: src/d8.h

Issue 56107: * Add rmdir, mkdir -p and umask to d8 on Unix.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/d8.cc » ('j') | src/d8-posix.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.h
===================================================================
--- src/d8.h (revision 1649)
+++ src/d8.h (working copy)
@@ -149,11 +149,23 @@
//
// os.setenv(variable, value) sets an environment variable. Repeated calls to
// this method leak memory due to the API of setenv in the standard C library.
+ //
+ // os.umask(alue) calls the umask system call and returns the old umask.
+ //
+ // os.mkdirp(name, mask) creates a directory. The mask (if present) is anded
+ // with the current umask. Intermediate directories are created if necessary.
+ // An exception is not thrown if the directory already exists. Analogous to
+ // the "mkdir -p" command.
static Handle<Value> OSObject(const Arguments& args);
static Handle<Value> System(const Arguments& args);
static Handle<Value> ChangeDirectory(const Arguments& args);
static Handle<Value> SetEnvironment(const Arguments& args);
+ static Handle<Value> SetUMask(const Arguments& args);
+ static Handle<Value> MakeDirectory(const Arguments& args);
+ static Handle<Value> RemoveDirectory(const Arguments& args);
+ static void AddOSMethods(Handle<ObjectTemplate> os_template);
+
static Handle<Context> utility_context() { return utility_context_; }
static const char* kHistoryFileName;
« no previous file with comments | « no previous file | src/d8.cc » ('j') | src/d8-posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698