filename.tex

来自「Wxpython Implemented on Windows CE, Sou」· TEX 代码 · 共 917 行 · 第 1/3 页

TEX
917
字号

Returns {\tt true} if the directory with this name exists.


\membersection{wxFileName::DirName}\label{wxfilenamedirname}

\func{static wxFileName}{DirName}{\param{const wxString\& }{dir}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}

Returns the object corresponding to the directory with the given name.
The {\it dir} parameter may have trailing path separator or not.



\membersection{wxFileName::FileExists}\label{wxfilenamefileexists}

\constfunc{bool}{FileExists}{\void}

\func{static bool}{FileExists}{\param{const wxString\& }{file}}

Returns {\tt true} if the file with this name exists.

\wxheading{See also}

\helpref{DirExists}{wxfilenamedirexists}



\membersection{wxFileName::FileName}\label{wxfilenamefilename}

\func{static wxFileName}{FileName}{\param{const wxString\& }{file}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}

Returns the file name object corresponding to the given {\it file}. This
function exists mainly for symmetry with \helpref{DirName}{wxfilenamedirname}.



\membersection{wxFileName::GetCwd}\label{wxfilenamegetcwd}

\func{static wxString}{GetCwd}{\param{const wxString\& }{volume = ""}}

Retrieves the value of the current working directory on the specified volume. If
the volume is empty, the program's current working directory is returned for the
current volume.

\wxheading{Return value}

The string containing the current working directory or an empty string on
error.

\wxheading{See also}

\helpref{AssignCwd}{wxfilenameassigncwd}


\membersection{wxFileName::GetDirCount}\label{wxfilenamegetdircount}

\constfunc{size\_t}{GetDirCount}{\void}

Returns the number of directories in the file name.


\membersection{wxFileName::GetDirs}\label{wxfilenamegetdirs}

\constfunc{const wxArrayString\&}{GetDirs}{\void}

Returns the directories in string array form.


\membersection{wxFileName::GetExt}\label{wxfilenamegetext}

\constfunc{wxString}{GetExt}{\void}

Returns the file name extension.


\membersection{wxFileName::GetForbiddenChars}\label{wxfilenamegetforbiddenchars}

\func{static wxString}{GetForbiddenChars}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}

Returns the characters that can't be used in filenames and directory names for the specified format.


\membersection{wxFileName::GetFormat}\label{wxfilenamegetformat}

\func{static wxPathFormat}{GetFormat}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}

Returns the canonical path format for this platform.


\membersection{wxFileName::GetFullName}\label{wxfilenamegetfullname}

\constfunc{wxString}{GetFullName}{\void}

Returns the full name (including extension but excluding directories).


\membersection{wxFileName::GetFullPath}\label{wxfilenamegetfullpath}

\constfunc{wxString}{GetFullPath}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}

Returns the full path with name and extension.


\membersection{wxFileName::GetHomeDir}\label{wxfilenamegethomedir}

\func{static wxString}{GetHomeDir}{\void}

Returns the home directory.


\membersection{wxFileName::GetLongPath}\label{wxfilenamegetlongpath}

\constfunc{wxString}{GetLongPath}{\void}

Return the long form of the path (returns identity on non-Windows platforms)


\membersection{wxFileName::GetModificationTime}\label{wxfilenamegetmodificationtime}

\constfunc{wxDateTime}{GetModificationTime}{\void}

Returns the last time the file was last modified.


\membersection{wxFileName::GetName}\label{wxfilenamegetname}

\constfunc{wxString}{GetName}{\void}

Returns the name part of the filename (without extension).

\wxheading{See also}

\helpref{GetFullName}{wxfilenamegetfullname}



\membersection{wxFileName::GetPath}\label{wxfilenamegetpath}

\constfunc{wxString}{GetPath}{\param{int }{flags = {\tt wxPATH\_GET\_VOLUME}}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}

Returns the path part of the filename (without the name or extension). The
possible flags values are:

\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf wxPATH\_GET\_VOLUME}}{Return the path with the volume (does
nothing for the filename formats without volumes), otherwise the path without
volume part is returned.}
\twocolitem{{\bf wxPATH\_GET\_SEPARATOR}}{Return the path with the trailing
separator, if this flag is not given there will be no separator at the end of
the path.}
\end{twocollist}


\membersection{wxFileName::GetPathSeparator}\label{wxfilenamegetpathseparator}

\func{static wxChar}{GetPathSeparator}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}

Returns the usually used path separator for this format. For all formats but 
{\tt wxPATH\_DOS} there is only one path separator anyhow, but for DOS there
are two of them and the native one, i.e. the backslash is returned by this
method.

\wxheading{See also}

\helpref{GetPathSeparators}{wxfilenamegetpathseparators}


\membersection{wxFileName::GetPathSeparators}\label{wxfilenamegetpathseparators}

\func{static wxString}{GetPathSeparators}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}

Returns the string containing all the path separators for this format. For all
formats but {\tt wxPATH\_DOS} this string contains only one character but for
DOS and Windows both {\tt '/'} and {\tt '\textbackslash'} may be used as
separators.

\wxheading{See also}

\helpref{GetPathSeparator}{wxfilenamegetpathseparator}


\membersection{wxFileName::GetPathTerminators}\label{wxfilenamegetpathterminators}

\func{static wxString}{GetPathTerminators}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}

Returns the string of characters which may terminate the path part. This is the
same as \helpref{GetPathSeparators}{wxfilenamegetpathseparators} except for VMS
path format where $]$ is used at the end of the path part.


\membersection{wxFileName::GetPathWithSep}\label{wxfilenamegetpathwithsep}

\constfunc{wxString}{GetPathWithSep}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}

Returns the path with the trailing separator, useful for appending the name to
the given path.

This is the same as calling \helpref{GetPath}{wxfilenamegetpath}
\texttt{(wxPATH\_GET\_VOLUME | wxPATH\_GET\_SEPARATOR, format)}.


\membersection{wxFileName::GetShortPath}\label{wxfilenamegetshortpath}

\constfunc{wxString}{GetShortPath}{\void}

Return the short form of the path (returns identity on non-Windows platforms).


\membersection{wxFileName::GetTimes}\label{wxfilenamegettimes}

\constfunc{bool}{GetTimes}{\param{wxDateTime* }{dtAccess}, \param{wxDateTime* }{dtMod}, \param{wxDateTime* }{dtCreate}}

Returns the last access, last modification and creation times. The last access
time is updated whenever the file is read or written (or executed in the case
of Windows), last modification time is only changed when the file is written
to. Finally, the creation time is indeed the time when the file was created
under Windows and the inode change time under Unix (as it is impossible to
retrieve the real file creation time there anyhow) which can also be changed
by many operations after the file creation.

Any of the pointers may be {\tt NULL} if the corresponding time is not
needed.

\wxheading{Return value}

{\tt true} on success, {\tt false} if we failed to retrieve the times.


\membersection{wxFileName::GetVolume}\label{wxfilenamegetvolume}

\constfunc{wxString}{GetVolume}{\void}

Returns the string containing the volume for this file name, empty if it
doesn't have one or if the file system doesn't support volumes at all (for
example, Unix).


\membersection{wxFileName::GetVolumeSeparator}\label{wxfilenamegetvolumeseparator}

\func{static wxString}{GetVolumeSeparator}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}

Returns the string separating the volume from the path for this format.


\membersection{wxFileName::HasExt}\label{wxfilenamehasext}

\constfunc{bool}{HasExt}{\void}

Returns {\tt true} if an extension is present.


\membersection{wxFileName::HasName}\label{wxfilenamehasname}

\constfunc{bool}{HasName}{\void}

Returns {\tt true} if a name is present.


\membersection{wxFileName::HasVolume}\label{wxfilenamehasvolume}

\constfunc{bool}{HasVolume}{\void}

Returns {\tt true} if a volume specifier is present.


\membersection{wxFileName::InsertDir}\label{wxfilenameinsertdir}

\func{void}{InsertDir}{\param{size\_t }{before}, \param{const wxString\& }{dir}}

Inserts a directory component before the zero-based position in the directory
list. Please see \helpref{AppendDir}{wxfilenameappenddir} for important notes.


\membersection{wxFileName::IsAbsolute}\label{wxfilenameisabsolute}

\func{bool}{IsAbsolute}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}

Returns {\tt true} if this filename is absolute.


\membersection{wxFileName::IsCaseSensitive}\label{wxfilenameiscasesensitive}

\func{static bool}{IsCaseSensitive}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}

Returns {\tt true} if the file names of this type are case-sensitive.


\membersection{wxFileName::IsOk}\label{wxfilenameisok}

\constfunc{bool}{IsOk}{\void}

Returns {\tt true} if the filename is valid, {\tt false} if it is not
initialized yet. The assignment functions and
\helpref{Clear}{wxfilenameclear} may reset the object to the uninitialized,
invalid state (the former only do it on failure).


\membersection{wxFileName::IsPathSeparator}\label{wxfilenameispathseparator}

\func{static bool}{IsPathSeparator}{\param{wxChar }{ch}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}

Returns {\tt true} if the char is a path separator for this format.


\membersection{wxFileName::IsRelative}\label{wxfilenameisrelative}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?