FUNCTION WritableDir(CONST Dir : STRING) : BOOLEAN;
VAR
FIL : FILE;
N : STRING;
I : Cardinal; BEGIN
REPEAT
N:=IncludeTrailingPathDelimiter(Dir);
FOR I:= TO -LENGTH(N) DO N:=N+CHAR(RANDOM()+)
UNTIL NOT FileExists(N);
Result:=TRUE;
TRY
AssignFile(FIL,N);
REWRITE(FIL,)
EXCEPT
Result:=FALSE
END;
IF Result THEN BEGIN
CloseFile(FIL);
ERASE(FIL)
END
END;

http://blog.csdn.net/genispan/article/details/10004487

最新文章

  1. ASP.NET MVC 5 Web编程3 -- Controller的应用及扩展
  2. Position和anchorPoint
  3. 对angular实现延迟加载template和controller
  4. android adb shell
  5. CSS3设置字体
  6. Java NIO 与 基于reactor设计模式的事件处理模型
  7. leetcode:Rotate Array
  8. android开发之路08(ListView&Adapter)
  9. BZOJ3394: [Usaco2009 Jan]Best Spot 最佳牧场
  10. JavaScript各种继承方式和优缺点
  11. RunLoop总结:RunLoop 与GCD 、Autorelease Pool之间的关系
  12. Groovy 设计模式 -- 适配器模式
  13. Maya cmds pymel scriptJob() 和 undoInfo() 在回调中撤销(undo)
  14. Oracle表空间的创建与删除
  15. Android 學習之旅!(1)
  16. XXXcannot be resolved to a type
  17. qt 软件打包
  18. Expo大作战(二十五)--expo sdk api之Admob
  19. css display table使用小例子实验
  20. November 23rd 2016 Week 48th Wednesday

热门文章

  1. Distribution download cancelled. Using distribution from 'https://services.gradle.org/distributions/
  2. style.height、offsetHeight、clientHeight、scrollHeight的差别
  3. Ubuntu安装编译OpenCV一键脚本(带ffmpeg)
  4. 最好用的中文速查表(Bash,Gdb,VIM,Nano)
  5. 【BZOJ 1016】 [JSOI2008]最小生成树计数(matrix-tree定理做法)
  6. Java 中StringBuffer与StringBuilder区别(转)及String类的一些基本操作代码
  7. QQ登录, 腾讯开放平台和QQ互联的坑
  8. Jdbc连接MySQL 8时报错“MySQLNonTransientConnectionException: Public Key Retrieval is not allowed”
  9. 一个封装了的选项卡效果js
  10. Android官方教程翻译(6)——添加ActionBar