AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de archivos externos
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Splits a file into several files. The created files can be merged into a single file by fMerge.
Ejemplo
// Splits the Video.avi file
fSplit("Video.avi", 100*1024*1024, "SplitVideo")
IF ErrorOccurred THEN
	// Displays the error message
	Error(ErrorInfo())
	RETURN
END

// The "SplitVideo.001" and "SplitVideo.002" files have been created
// Delete the source file ("Video.avi")
fDelete("Video.avi")

// Uses the "SplitVideo.001" and "SplitVideo.002" files 
// to recreate the "Video.avi" file 
fMerge("SplitVideo", "Video.avi")
IF ErrorOccurred THEN
	// Displays the error message
	Error(ErrorInfo())
	RETURN
END
Sintaxis
<Result> = fSplit(<File name> , <Maximum size> [, <Output file> [, <Option> [, <Progress Bar control>]]])
<Result>: Integer
  • Number of created files,
  • 0 if an error occurs. To get more details on the error, use ErrorInfo with the errMessage constant.
<File name>: Character string
Full name of file to split.
<Maximum size>: Integer
Maximum size (in bytes) of each created file. This size must be greater than 0.
<Output file>: Optional character string
Full path of the files to create. The created files will correspond to the specified name followed by a ".xxx" extension where xxx corresponds to the index of the created file.
By default, <Output file> corresponds to <File name>.
<Option>: Optional Integer constant
The source file is kept during the split operation. You have the ability to specify the following split option:
fDeleteSourceThe source file will be deleted as the split operation goes along.
Warning: If an error occurs, the source file will be LOST and cannot be retrieved.
<Progress Bar control>: Optional control name
Name of Progress Bar control, used to show the progress of the split operation.
Observaciones
  • fOpen cannot be used on a multi-part file. Before using fOpen, the original file must be created again with fMerge.
    Note: The fOpen function used on a part only accesses the sub-file corresponding to that part.
  • The function will return an error if an existing file and one of the sub-files to create have the same name.
  • The number of files that can be created cannot exceed 10 000.
Componente: wd300std.dll
Versión mínima requerida
  • Versión 19
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local