Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

API Pfaderstellung

Empfohlene Antworten

Veröffentlicht

Hey,

kann mir einer sagen wie ich einen Pfad in API anlegen kann?

z.B C:\Test\Test

Das Verzeichniss Test besteht noch gar nicht auf C:

Ich habe es mit dem Befehl

CreateDirectoryex und mit CreateDirektory versucht. Aber ich kann damit nicht Test\Test erstellen

Gruß

Neo_2001

Such mal nach ForceDir oder ForceDirectory, vielleicht geht es damit.

In DOS geht das auch nicht!

Du mußt vorher das eine Test erstellen, dann hineinjumpen und den nächsten Unterpfad erstellen.

ForceDirectories in Delphi sieht so aus ...

function ForceDirectories(Dir: string): Boolean;

begin

Result := True;

if Length(Dir) = 0 then

raise Exception.CreateRes(@SCannotCreateDir);

Dir := ExcludeTrailingBackslash(Dir);

if (Length(Dir) < 3) or DirectoryExists(Dir)

or (ExtractFilePath(Dir) = Dir) then Exit; // avoid 'xyz:\' problem.

Result := ForceDirectories(ExtractFilePath(Dir)) and CreateDir(Dir);

end;

Es ist also eine rekursive Funktion, die immer das letzte Directory aus einer Liste von Dirs (also z.B. c:\temp\temp etc.) nimmt , es erzeugt, und dalles davor nochmal an sich selbst übergibt.

Somit werden alle Dirs erzeugt, auch wenn sie nicht vorhanden sind.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.