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
  • Integrating resources when generating the iPhone/iPad application
  • Handling the read-only files found in the directory of resources
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
Returns the path of the read-only resources of the application.
Ejemplo
// The function returns the content of the file
fLoadBuffer(fResourceDir() + ["\"] + "data.bin")
Sintaxis
<Result> = fResourceDir()
<Result>: Character string
Full path of the read-only resources found in the application. Corresponds to the ".app" directory of the application. You cannot write into this directory.
Observaciones
iPhone/iPadIOS WidgetMac Catalyst

Integrating resources when generating the iPhone/iPad application

The iOS application generation wizard allows you to include files in the executable. You can include:
  • specific resources.
  • specific images.
  • data files.
If the "Write" option is checked for the files, they will be automatically extracted (e.g., files that must be modified by the application). In this case, specify in which application directory the file should be extracted ("Documents" directory or "Library" directory).
If the "Write" option is unchecked for the files, they can be:
  • used directly (files to be read, for example: sound files, image files, etc.). These files are included in the application and will not be extracted. fResourceDir is used to access these files in read-only mode.
  • extracted programmatically with fExtractResource.
Warning The iOS system is case sensitive.
iPhone/iPadIOS WidgetMac Catalyst

Handling the read-only files found in the directory of resources

The tree structure of the resource directory is identical to the tree structure of the project directory on the development computer:
  • on the development computer, the resource included in the Xcode project can be found in a directory such as:
    <Project_Name>\EXE\<Configuration name>\<Custom directory>.
  • on iPhone or iPad, the resource will be in a directory such as:
    fResourceDir() + \EXE\<Configuration name>\<Custom directory>.
Example The following code checks the existence of the file "stop.png" in the resource directory. On the development computer, this file is in the "C:\My Projects\MyApp\Exe\iOS Application\stop.png" directory.
On the iPhone or iPad, this path corresponds to: "<Application Directory>/MyApp.app/Exe/iOS Application/stop.png".
IF fFileExist(CompleteDir(fResourceDir()) + CompleteDir("Exe") + ...
CompleteDir("iOS Application") + "stop.png") = True THEN
Info("The image was found")
ELSE
Info("Image not found.")
END
Versión mínima requerida
  • Versión 17
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