📄 is_writable_dir.pro
字号:
; $Id: is_writable_dir.pro,v 1.2 2002/03/14 11:49:12 riccardi Exp $
;+
;
; NAME
;
; IS_WRITABLE_DIR
;
; SYNTAX
;
; ret = is_writable_dir(dirname)
;
; dirname: scalar string containing the directory name to test.
;
; ret: scalar byte. 1B if it is possible to write in dirname. 0B otherwise.
;
; April 1999, written by A. Riccardi (OAA) <riccardi@arcetri.astro.it>
;-
function is_writable_dir, dirname
;; try to open a temporary file
filename = filepath("tmp"+strtrim(long(systime(1)),2), ROOT=dirname)
openw, unit, filename, /GET_LUN, ERROR=error, /DELETE
is_writable = error eq 0
if is_writable then free_lun, unit
return, is_writable
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -