Nasal library/os.path: Difference between revisions

→‎Class: Doc exists()
(→‎Class: Doc concat())
(→‎Class: Doc exists())
Line 67: Line 67:


==== exists() ====
==== exists() ====
{{Nasal doc
|syntax = os.path.exists([);
|text = Returns 1 (true) if the path exists and 0 (false) if it does not.
|example1 = var path = os.path.new("C:/Windows");
# var path = os.path.new("/usr"); # alternative Unix filepath
print(path.exists()); # prints 1 (true)
path.set("C:/Window");
# path.set("/r"); # alternative Unix filepath
print(path.exists()); # prints 0 (false)
}}
==== canRead() ====
==== canRead() ====
==== canWrite() ====
==== canWrite() ====