fileexists?File System
其实fileexists的问题并不复杂,但是又很多的朋友都不太了解File System,因此呢,今天小编就来为大家分享fileexists的一些知识,希望可以帮助到大家,下面我们一起来看看这个问题的分析吧!
oracle高手进
ORA-06550:第 4行,第 10列:
PLS-00201:必须说明标识符'DBMS_XMLSTORE.CTXTYPE'
这个错误是说你还没有安装DBMS_XMLSTORE这个包,到网上搜索一下这个包在哪,然后安装上!
ORA-06550:第 45行,第 3列:
PLS-00320:此表达式的类型说明不完整或格式不正确
这个错误我不知道你具体定位到那一行,看看下面对这个错误的解释以及解决办法
PLS-00320: the declaration of the type of this expression is incomplete or malformed
Cause: In a declaration, the name of a variable or cursor is misspelled or the declaration makes a forward reference. Forward references are not allowed in PL/SQL. A variable or cursor must be declared before it is referenced it in other statements, including other declarative statements. For example, the following declaration of dept_rec raises this exception because it refers to a cursor not yet declared: DECLARE dept_rec dept_cur%ROWTYPE; CURSOR dept_cur IS SELECT......
Action: Check the spelling of all identifiers in the declaration. If necessary, move the declaration so that it makes no forward references.
File System
Microsoft Scripting Runtime本来是为VBScript准备的磁盘,文件夹及文件操作对象,众所周知的HappyTime病毒就是利用其中的FileSystemObject来完成其破坏动作的,可见其功能之强大.基本上来说,Microsoft Scripting Runtime里面所提供的对象以及对象的方法和属性可以满足对磁盘,文件夹和文件的所有管理操作.可以说,在VB中,只用Microsoft Scripting Runtime就可以做出一个比较简单但是可以实现基本功能的资源管理器,而不需要任何API调用.现在我就对Microsoft Scripting Runtime做一个简要的介绍.
(在VB中使用Microsoft Scripting Runtime需要以下操作:Project->Refrences->Microsoft Scripting Runtime)
Microsoft Scripting Runtime中的主要对象:
对象作用
Dictionary
Drive磁盘
Drives基于Drive的集合
Encorder
File文件
Files基于文File的集合
FileSystemObject文件系统对象,对文件进行操作
Folder文件夹
Folders基于Folder的集合
TextStream文本流
◆Drive对象
方法|属性数据类型说明
AvailableSpace Variant可用空间
DriveLetter String盘符
DriveType DriveTypeConst磁盘类型
CDRom=4
Fixed=2
RamDisk=5
Remote=3
Removable=1
UnknownType=0
FileSystem String文件系统,比如:FAT,FAT16,FAT32,NTFS等.
FreeSpace Variant可用空间.目前还没有发现与AvailableSpace有什么不同.
IsReady Boolean设备是否就绪,比如软驱或者光驱中是否有盘.
Path String磁盘的路径,比如C盘就是"C:"
RootFolder String根目录,比如C盘就是"C:\"
SerialNumber Long序列号
SharedName Stirng共享名
TotalSize Variant总共磁盘容量
VolumeName String卷标
◆Folder对象
方法|属性数据类型说明
Attributes FileAttribute文件夹属性
Alias=1024
Archive=32
Compressed=2048
Directory=16
Hidden=2
Normal=0
ReadOnly=1
System=4
Volume=8
Copy声明:Sub Copy(Destination As String, [OverWriteFiles As Boolean= True])
Copy该文件夹到目标路径Destination,如果Copy失败则出错
CreateTextFile TextStream声明:Function CreateTextFile(FileName As String, [Overwrite As Boolean= True], [Unicode As Boolean= False]) As TextStream
在此目录下创建一个文本文件,Overwrite参数标识如果有同名文件是否覆盖,Unicode表示是否使用Unicode编码格式
DateCreated Date创建时间
DateLastAccessed Date最后访问时间
DateLastModified Date最后修改时间
Delete删除文件夹
Drive Drive所在磁盘
Files Files该文件夹下所有的文件
IsRootFolder Boolean时候所在磁盘的根目录
Move声明:Sub Move(Destination As String)
移动该文件夹到文件夹Destination
Name String名称
ParentFolder Folder父文件夹
Path String全路径
ShortName String短名
ShortPath String短路径
Size Variant大小
SubFolders Folders所有的子文件夹
Type String类型
◆File对象
方法|属性数据类型说明
Attributes FileAttribute文件属性
Alias=1024
Archive=32
Compressed=2048
Directory=16
Hidden=2
Normal=0
ReadOnly=1
System=4
Volume=8
Copy声明:Sub Copy(Destination As String, [OverWriteFiles As Boolean= True])
Copy该文件到目标路径Destination,如果Copy失败则出错
DateCreated Date创建时间
DateLastAccessed Date最后访问时间
DateLastModified Date最后修改时间
Delete删除该文件
Move声明:Sub Move(Destination As String)
移动该文件到文件夹Destination
Name String名称
OpenAsTextStream TextStream Function OpenAsTextStream([IOMode As IOMode= ForReading], [Format As Tristate= TristateFalse]) As TextStream
以文本流格式打开该文件
IOMode:
ForAppending=8:追加
ForReading=1:只读
ForWriting=2:可写
ParentFolder Folder父文件夹
Path String全路径
ShortName String短名
ShortPath String短路径
Size Variant大小
Type String类型
◆FileSystemObject对象
方法|属性说明
Function BuildPath(Path As String, Name As String) As String建立目录
Sub CopyFile(Source As String, Destination As String, [OverWriteFiles As Boolean= True])复制一个文件
Sub CopyFolder(Source As String, Destination As String, [OverWriteFiles As Boolean= True])
复制文件夹
Function CreateFolder(Path As String) As Folder创建文件夹
Function CreateTextFile(FileName As String, [Overwrite As Boolean= True], [Unicode As Boolean= False]) As TextStream创建文本文件
Sub DeleteFile(FileSpec As String, [Force As Boolean= False])删除文件
Sub DeleteFolder(FolderSpec As String, [Force As Boolean= False])删除文件夹
Function DriveExists(DriveSpec As String) As Boolean某一磁盘是否存在
Property Drives As Drives唯一的一个属性,取得系统中所有的磁盘
Function FileExists(FileSpec As String) As Boolean文件是否存在
Function FolderExists(FolderSpec As String) As Boolean文件夹是否参在
Function GetAbsolutePathName(Path As String) As String取得绝对路径
Function GetBaseName(Path As String) As String取得文件夹名称
Function GetDrive(DriveSpec As String) As Drive取得磁盘
Function GetDriveName(Path As String) As String取得磁盘的名称
Function GetExtensionName(Path As String) As String取得文件的扩展名
Function GetFile(FilePath As String) As File取得文件
Function GetFileName(Path As String) As String取得文件名
Function GetFileVersion(FileName As String) As String取得文件版本
Function GetFolder(FolderPath As String) As Folder取得文件夹
Function GetParentFolderName(Path As String) As String取得父文件夹
Function GetSpecialFolder(SpecialFolder As SpecialFolderConst) As Folder取得特殊文件夹
SystemFolder=1:系统目录
例如:"C:\Winnt\System32"
TemporaryFolder=2:临时目录
例如:"C:\Winnt\Temp"
WindowsFolder=0:Windows路径
例如:"C:\Winnt"
Function GetStandardStream(StandardStreamType As StandardStreamTypes, [Unicode As Boolean]) As TextStream获取流
Function GetTempName() As String生成一个扩展名为tmp的文件名(随机产生的)
Sub MoveFile(Source As String, Destination As String)移动文件
Sub MoveFolder(Source As String, Destination As String)移动文件夹
Function OpenTextFile(FileName As String, [IOMode As IOMode= ForReading], [Create As Boolean= False], [Format As Tristate= TristateFalse]) As TextStream打开一个文本文件
◆TextStream对象
方法|属性数据类型说明
AtEndOfLine Boolean行末
AtEndOfStream Boolean流末
Close关闭
Column Long当前列
Line Long当前行
Read String读取一定的字符
ReadAll String读取所有
ReadLine String读取当前行
Skip跳过
SkipLine跳过一行
Write写文件
WriteBlankLines写一个空行.
WriteLine写一行
END,本文到此结束,如果可以帮助到大家,还望关注本站哦!