⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 is_writable_dir.pro

📁 IDL语言编写的用于天文自适应光学仿真的软件CAOS V6.0的第一部分。
💻 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 + -